MDL-59831 core_user: only set default group when necessary