Fixes #1184: `@package` was not inherited

The contents of the `@package` were not propagated from the file all the
way up to functions, constants, classes, interfaces and traits. This
commit addresses that issue and thus resolves issue #1148