[OPT] small optimization in package validator.
Merge pull request #795 from dimitarp/next

[OPT] small optimization in package validator.