Optimisation: Package.hashCode was too expensive