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 
continue;
            }
            if (has_label)
                pwallet->SetAddressBook(PKHash(keyid), label, "receive");
            nTimeBegin = std::min(nTimeBegin, time);
            progress++;
        }
        for (const auto& script_pair : scripts) {
            pwallet->chain().showProgress("", std::max(50, std::min(75, (int)((progress / total) * 100) + 50)), false);
            const CScript& script = script_pair.first;
            int64_t time = script_pair.second;
            if (!pwallet->ImportScripts({script}, time)) {
                pwallet->WalletLogPrintf("Error importing script %s\n", HexStr(script));
                fGood = false;
                continue;
            }
            if (time > 0) {
                nTimeBegin = std::min(nTimeBegin, time);
            }
            progress++;
        }
        pwallet->chain().showProgress("", 100, false); // 
    }
    pwallet->chain().showProgress("", 100, false); // 
    RescanWallet(*pwallet, reserver, nTimeBegin, false /* 
    pwallet->MarkDirty();
    if (!fGood)
        throw JSONRPCError(RPC_WALLET_ERROR, "Error adding some keys/scripts to wallet");
    return NullUniValue;
},