Speed-up of checking if package is a member of a group.