I'm sometimes getting an invalid json reply from `getwalletinfo` when rescanning is in progress.

The invalid part is this: `"scanning":{"duration":19,"progress":}}` (no value for `progress`).

I can't reliably reproduce this, but I did manage to run into this 3 times now (once every 10-20 attempts or so).

I'm running v0.20.0 and testing against a regtest instance. This happens while doing a batched `importmulti` of 2000 addresses (none of which have history).
PKHash pkh_dest(keyid);
                if (GetDestData(pkh_dest, "used", nullptr)) {
                    return true;
                }
            }
        }
    }
    return false;
}
CWalletTx* CWallet::AddToWallet(CTransactionRef tx, const CWalletTx::Confirmation& confirm, const UpdateWalletTxFn& update_wtx, bool fFlushOnClose)
{
    LOCK(cs_wallet);
    WalletBatch batch(*database, fFlushOnClose);
    uint256 hash = tx->GetHash();
    if (IsWalletFlagSet(WALLET_FLAG_AVOID_REUSE)) {
        
        std::set<CTxDestination> tx_destinations;
        for (const CTxIn& txin : tx->vin) {
            const COutPoint& op = txin.prevout;
            SetSpentKeyState(batch, op.hash, op.n, true, tx_destinations);
        }
        MarkDestinationsDirty(tx_destinations);
    }
    
    auto ret = mapWallet.emplace(std::piecewise_construct, std::forward_as_tuple(hash), std::forward_as_tuple(this, tx));
    CWalletTx& wtx = (*ret.first).second;
    bool fInsertedNew = ret.second;
    bool fUpdated = update_wtx && update_wtx(wtx, fInsertedNew);
    if (fInsertedNew) {
        wtx.m_confirm = confirm;