Fixed #22057 -- Ensured reverse_lazy can be used in settings

And without causing a circular import. Thanks Akis Kesoglou for
the report.