Added group hierarchy test functions.
Implicit group recursion to not blow the stack.