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 
// 
        auto it = spk_man.m_script_metadata.find(scriptid);
        if (it != spk_man.m_script_metadata.end()) {
            create_time = FormatISO8601DateTime(it->second.nCreateTime);
        }
        if(spk_man.GetCScript(scriptid, script)) {
            file << strprintf("%s %s script=1", HexStr(script), create_time);
            file << strprintf(" # addr=%s\n", address);
        }
    }
    file << "\n";
    file << "# End of dump\n";
    file.close();
    UniValue reply(UniValue::VOBJ);
    reply.pushKV("filename", filepath.u8string());
    return reply;
},
    };
}
struct ImportData
{
    // 
    std::unique_ptr<CScript> redeemscript; //
    std::unique_ptr<CScript> witnessscript; //
    // 
    std::set<CScript> import_scripts;
    std::map<CKeyID, bool> used_keys; //
    std::map<CKeyID, std::pair<CPubKey, KeyOriginInfo>> key_origins;
};
enum class ScriptContext