Why it's necessary, to set the default usergroup id for new users manual??
IMO this should be handled by the datawriter,... if non groupid is set, set the default groupid ( XenForo_Model_User::$defaultRegisteredGroupId )
IMO the logic doesn't need to handle this.
just like the language_id for example
the userdw should require IMO only username & pw to be able to create successful a new user record.
All other fields are already handled by the dw, so the default group id should be handled too, without needing to set it manual