Ah, it’s good that you’re paying attention to possible errors.
It’s true that it would be an error if you had a node data object whose key
and group
properties were the same value. But it would also be a problem if G1 were a member of G2 that was a member of G1. Or any situation that had such a membership cycle.