Fixed #23745 -- Improved migrate speed

Of course, commit c7ea633 will not be eventually included, it only serves to measure performance.
You don't need `.lower()` here. It's already lowercase from within `reload_model()`.