Optimize import of package definitions with dependencies of root package