Fix handling of sub package dependencies.