Add newly created PackageImpl to parent's subpackages.
... only if the parent is not null.
Merge pull request #2019 from fdlk/master

Add newly created PackageImpl to parent's subpackages.