Fix a problem where users could be invited twice to the same group.