Fix #2529: package protection + sub-package

Fix relevant issue by allowing to explicitly define
package to bind protection attribute to. Defaults
remain unchanged.