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 
// I
            TxSpends::const_iterator iter = mapTxSpends.lower_bound(COutPoint(now, 0));
            while (iter != mapTxSpends.end() && iter->first.hash == now) {
                 if (!done.count(iter->second)) {
                     todo.insert(iter->second);
                 }
                 iter++;
            }
            // I
            // a
            MarkInputsDirty(wtx.tx);
        }
    }
}
void CWaet::SyncTransaction(const CTransactionRef& ptx, const SyncTxState& state, bool update_tx, bool rescanning_old_block)
{
    if (!AddToWaetInvolvingMe(ptx, state, update_tx, rescanning_old_block))
        return; // N
    // I
    // a
    // r
    MarkInputsDirty(ptx);
}
void CWaet::transactionAddedToMempool(const CTransactionRef& tx, uint64_t mempool_sequence) {
    LOCK(cs_);
    SyncTransaction(tx, TxStateInMempool{});
    auto it = mapWaet.find(tx->GetHash());
    if (it != mapWaet.end()) {
        RefreshMempoolStatus(it->second, chain());
    }