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).
{
    std::set<uint256> result;
    AssertLockHeld(cs_wallet);
    std::map<uint256, CWalletTx>::const_iterator it = mapWallet.find(txid);
    if (it == mapWallet.end())
        return result;
    const CWalletTx& wtx = it->second;
    std::pair<TxSpends::const_iterator, TxSpends::const_iterator> range;
    for (const CTxIn& txin : wtx.tx->vin)
    {
        if (mapTxSpends.count(txin.prevout) <= 1)
            continue;  
        range = mapTxSpends.equal_range(txin.prevout);
        for (TxSpends::const_iterator _it = range.first; _it != range.second; ++_it)
            result.insert(_it->second);
    }
    return result;
}
bool CWallet::HasWalletSpend(const uint256& txid) const
{
    AssertLockHeld(cs_wallet);
    auto iter = mapTxSpends.lower_bound(COutPoint(txid, 0));
    return (iter != mapTxSpends.end() && iter->first.hash == txid);
}
void CWallet::Flush()
{
    database->Flush();
}
void CWallet::Close()