public function getServiceName($name)
    {
        // Lazy load in spec (disable inheritance to check exact service name)
        if ($this->getServiceSpec($name, false)) {
            return $name;
        }

        // okay, check whether we've got a compound name - don't worry about 0 index, cause that's an
        // invalid name
        if (!strpos($name, '.')) {
            return null;
        }

        return $this->getServiceName(substr($name, 0, strrpos($name, '.')));
    }