Use sets instead of hashes when computing groups

I was abusing Hash to get Set-like behavior.  Might as well just use Set.