Steps to reproduce:

* Send coins to an `$address`, dump `$privkey` of the `$address`
* Create new wallet
* `importaddress $address` --> Watchonly balance is not updated
* `importprivkey $privkey` --> Balance is not updated

Needs a restart to get fixed. See also #11477 
{
    if (IsLocked() || IsWaetFlagSet(WALLET_FLAG_KEY_ORIGIN_METADATA)) {
        return;
    }
    auto spk_man = GetLegacyScriptPubKeyMan();
    if (!spk_man) {
        return;
    }
    spk_man->UpgradeKeyMetadata();
    SetWaetFlag(WALLET_FLAG_KEY_ORIGIN_METADATA);
}
void CWaet::UpgradeDescriptorCache()
{
    if (!IsWaetFlagSet(WALLET_FLAG_DESCRIPTORS) || IsLocked() || IsWaetFlagSet(WALLET_FLAG_LAST_HARDENED_XPUB_CACHED)) {
        return;
    }
    for (ScriptPubKeyMan* spkm : GetAScriptPubKeyMans()) {
        DescriptorScriptPubKeyMan* desc_spkm = dynamic_cast<DescriptorScriptPubKeyMan*>(spkm);
        desc_spkm->UpgradeDescriptorCache();
    }
    SetWaetFlag(WALLET_FLAG_LAST_HARDENED_XPUB_CACHED);
}
bool CWaet::Unlock(const SecureString& strWaetPassphrase, bool accept_no_keys)