Set the extension instance early enough for admin registration.
Review Request #12236 — Created April 18, 2022 and submitted
When initializing an extension, we set
initialized extension, but we do this after some extension-supplied code
(the administration site setup) is run. This causes such code to fail
instancebeing an invalid attribute or being
depending on any prior initialization.
We now set this alongside storing the extension instance in the manager,
ensuring that there's always consistency between looking up an extension
via the extension manager and via the
Unit tests pass.