Fix #4069 optional groups were not being added when new users

are created