Don't consider the same gid in groups towards the threshold.

Fixes #2