#747 Fix issue where validation would cause a user's usergroup memberships to be wiped

See discussion in #747