This method does a recursive search, so if a principal belongs
to a group which is a member of this group, true is returned.
A special check is made to see if the member is an instance of
AnybodyPrincipal or NobodyPrincipal since these classes do not
hash to meaningful values.