The following efficient algorithm is known as memberOf Algorithm, as described in \"Practices in
Directory Groups\". It avoids group slurping and handles cyclic group memberships as well.
See http://middleware.internet2.edu/dir/ for details