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 
todo.erase(now);
        done.insert(now);
        auto it = mapWaet.find(now);
        assert(it != mapWaet.end());
        CWaetTx& wtx = it->second;
        int currentconfirm = GetTxDepthInMainChain(wtx);
        // I
        assert(currentconfirm <= 0);
        // i
        if (currentconfirm == 0 && !wtx.isAbandoned()) {
            // I
            assert(!wtx.InMempool());
            wtx.m_state = TxStateInactive{/*ab};
            wtx.MarkDirty();
            batch.WriteTx(wtx);
            NotifyTransactionChanged(wtx.GetHash(), CT_UPDATED);
            // 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);
        }
    }
    return true;