Adding support for group hierarchies when checking group membership.