Fix building sub packages that depend on their own parent package.