Prevent adding the same group multiple times

Caveat in comments. Note that this feature is meant to work together
with the backend not sending back selected groups.

Signed-off-by: Ari Rahikkala <ari.rahikkala@gmail.com>