Fixed #20290 -- override_settings cannot be nested

Refactored override_settings to store the underlying settings._wrapped
value seen at runtime, not instantiation time.