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

if (!IsCrypted()) {
        return batch.WriteKey(pubkey,
                                                 secret.GetPrivKey(),
                                                 mapKeyMetadata[pubkey.GetID()]);
    }
    return true;
}
bool CWallet::AddKeyPubKey(const CKey& secret, const CPubKey &pubkey)
{
    WalletBatch batch(*database);
    return CWallet::AddKeyPubKeyWithDB(batch, secret, pubkey);
}
bool CWallet::AddCryptedKey(const CPubKey &vchPubKey,
                            const std::vector<unsigned char> &vchCryptedSecret)
{
    if (!CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret))
        return false;
    {
        LOCK(cs_wallet);
        if (encrypted_batch)
            return encrypted_batch->WriteCryptedKey(vchPubKey,
                                                        vchCryptedSecret,
                                                        mapKeyMetadata[vchPubKey.GetID()]);
        else
            return WalletBatch(*database).WriteCryptedKey(vchPubKey,
                                                            vchCryptedSecret,
                                                            mapKeyMetadata[vchPubKey.GetID()]);
    }
}
void CWallet::LoadKeyMetadata(const CKeyID& keyID, const CKeyMetadata &meta)