`bitcoin-cli loadwallet "wallet.dat"` command causes bitcoind crash

log info:
```
bitcoind: wallet/db.cpp:236: BerkeleyEnvironment::VerifyResult BerkeleyEnvironment::Verify(const string&, BerkeleyEnvironment::recoverFunc_type, std::__cxx11::string&): Assertion `mapFileUseCount.count(strFile) == 0' failed.
Aborted (core dumped)
```

Bitcoin Core Daemon version `v0.17.0.0-ge1ed37edaedc85b8c3468bd9a726046344036243`

{
    const CTransaction& tx = *ptx;
    {
        AssertLockHeld(cs_wallet);
        if (pIndex != nullptr) {
            for (const CTxIn& txin : tx.vin) {
                std::pair<TxSpends::const_iterator, TxSpends::const_iterator> range = mapTxSpends.equal_range(txin.prevout);
                while (range.first != range.second) {
                    if (range.first->second != tx.GetHash()) {
                        WalletLogPrintf("Transaction %s (in block %s) conflicts with wallet transaction %s (both spend %s:%i)\n", tx.GetHash().ToString(), pIndex->GetBlockHash().ToString(), range.first->second.ToString(), range.first->first.hash.ToString(), range.first->first.n);
                        MarkConflicted(pIndex->GetBlockHash(), range.first->second);
                    }
                    range.first++;
                }
            }
        }
        bool fExisted = mapWallet.count(tx.GetHash()) != 0;
        if (fExisted && !fUpdate) return false;
        if (fExisted || IsMine(tx) || IsFromMe(tx))
        {
            /* Check if any keys in the wallet keypool that were supposed to be unused
             * have appeared in a new transaction. If so, remove those keys from the keypool.
             * This can happen when restoring an old wallet backup that does not contain
             * the mostly recently created transactions from newer versions of the wallet.
             */
            
            for (const CTxOut& txout: tx.vout) {