Added group membership cycle detection (finally)