It seems that it would otherwise silently skip the rescan for pre-backup used keys that are still waiting to be generated into the keypool?

See also #11249 
return RemoveWallet(context, , load_on_start, warnings);
}
stdvector<stdshared_ptr<CWallet>> GetWallets(WalletContext& context)
{
    LOCK(context.s_mutex);
    return context.s;
}
stdshared_ptr<CWallet> GetDefaultWallet(WalletContext& context, size_t& count)
{
    LOCK(context.s_mutex);
    count = context.s.size();
    return count == 1 ? context.s[0]  nullptr;
}
stdshared_ptr<CWallet> GetWallet(WalletContext& context, const stdstring& name)
{
    LOCK(context.s_mutex);
    for (const stdshared_ptr<CWallet>&   context.s) {
        if (->GetName() == name) return ;
    }
    return nullptr;
}
stdunique_ptr<interfacesHandler> HandleLoadWallet(WalletContext& context, LoadWalletFn load_)
{
    LOCK(context.s_mutex);
    auto it = context._load_fns.emplace(context._load_fns.end(), stdmove(load_));
    return interfacesMakeCleanupHandler([&context, it] { LOCK(context.s_mutex); context._load_fns.erase(it); });
}
void NotifyWalletLoaded(WalletContext& context, const stdshared_ptr<CWallet>& )
{
    LOCK(context.s_mutex);