`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`

{
    WalletBatch batch(*database);
    batch.WriteBestBlock(loc);
}
void CWallet::SetMinVersion(enum WalletFeature nVersion, WalletBatch* batch_in, bool fExplicit)
{
    LOCK(cs_wallet); 
    if (nWalletVersion >= nVersion)
        return;
    
    if (fExplicit && nVersion > nWalletMaxVersion)
            nVersion = FEATURE_LATEST;
    nWalletVersion = nVersion;
    if (nVersion > nWalletMaxVersion)
        nWalletMaxVersion = nVersion;
    {
        WalletBatch* batch = batch_in ? batch_in : new WalletBatch(*database);
        if (nWalletVersion > 40000)
            batch->WriteMinVersion(nWalletVersion);
        if (!batch_in)
            delete batch;
    }
}
bool CWallet::SetMaxVersion(int nVersion)