protected function includeBranchAlias(VcsDriverInterface $driver, PackageInterface $package, $branch)
    {
        if (null !== $this->rootPackageVersion && $branch === $driver->getRootIdentifier()) {
            $aliasNormalized = $this->normalizeBranchAlias($package);
            $package = $package instanceof AliasPackage ? $package->getAliasOf() : $package;
            $package = $this->overrideBranchAliasConfig($package, $aliasNormalized, $branch);
            $package = $this->addPackageAliases($package, $aliasNormalized);
        }

        return $package;
    }