core: raise an exception if the group already exists

Like it was the case before.