Opening two of the same wallet (tested in v0.18.0 of bitcoin-qt 64 bit) will cause a database collision, and will crash the program.

`[marshall@likon] {21:21} [~] $ bitcoin-0.18.0/bin/bitcoin-qt `
`terminate called after throwing an instance of 'std::runtime_error'  what():  BerkeleyBatch: Can't open database 8204388-wallet.dat (duplicates fileid 8b1c090000000800e25686350000000000000000 from 1352491-wallet.dat)`
`Aborted (core dumped)`

I have been able to reproduce the issue by importing two of the same wallet (with different filenames).
return nullptr;
    }
    if (!gArgs.GetArg("-changetype", "").empty() && !ParseOutputType(gArgs.GetArg("-changetype", ""), walletInstance->m_default_change_type)) {
        error = strprintf(_("Unknown change type '%s'").translated, gArgs.GetArg("-changetype", ""));
        return nullptr;
    }
    if (gArgs.IsArgSet("-mintxfee")) {
        CAmount n = 0;
        if (!ParseMoney(gArgs.GetArg("-mintxfee", ""), n) || 0 == n) {
            error = AmountErrMsg("mintxfee", gArgs.GetArg("-mintxfee", "")).translated;
            return nullptr;
        }
        if (n > HIGH_TX_FEE_PER_KB) {
            warnings.push_back(AmountHighWarn("-mintxfee").translated + " " +
                              _("This is the minimum transaction fee you pay on every transaction.").translated);
        }
        walletInstance->m_min_fee = CFeeRate(n);
    }
    if (gArgs.IsArgSet("-fallbackfee")) {
        CAmount nFeePerK = 0;
        if (!ParseMoney(gArgs.GetArg("-fallbackfee", ""), nFeePerK)) {
            error = strprintf(_("Invalid amount for -fallbackfee=<amount>: '%s'").translated, gArgs.GetArg("-fallbackfee", ""));
            return nullptr;
        }
        if (nFeePerK > HIGH_TX_FEE_PER_KB) {
            warnings.push_back(AmountHighWarn("-fallbackfee").translated + " " +
                              _("This is the transaction fee you may pay when fee estimates are not available.").translated);
        }
        walletInstance->m_fallback_fee = CFeeRate(nFeePerK);
    }