This is giving more real test conditions when AUTH_USER_MODEL is set with override_settings. Backport of a962bc7c from master.