public function getComponentInstallDirectory($component)
    {
        list($type, $name) = $this->normalizeComponent($component);

        // Must use reflection to avoid using static cache.
        $method = new \ReflectionMethod('core_component', 'fetch_plugintypes');
        $method->setAccessible(true);
        $result = $method->invoke(null);

        if (!array_key_exists($type, $result[0])) {
            throw new \InvalidArgumentException(sprintf('The component %s has an unknown plugin type of %s', $component, $type));
        }

        return $result[0][$type].'/'.$name;
    }