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).
{
    if (!m_internal_spk_managers.empty() || !m_external_spk_managers.empty() || !m_spk_managers.empty()) {
        return;
    }
    auto spk_manager = std::unique_ptr<ScriptPubKeyMan>(new LegacyScriptPubKeyMan(*this));
    for (const auto& type : OUTPUT_TYPES) {
        m_internal_spk_managers[type] = spk_manager.get();
        m_external_spk_managers[type] = spk_manager.get();
    }
    m_spk_managers[spk_manager->GetID()] = std::move(spk_manager);
}
const CKeyingMaterial& CWallet::GetEncryptionKey() const
{
    return vMasterKey;
}
bool CWallet::HasEncryptionKeys() const
{
    return !mapMasterKeys.empty();
}
void CWallet::ConnectScriptPubKeyManNotifiers()
{
    for (const auto& spk_man : GetActiveScriptPubKeyMans()) {
        spk_man->NotifyWatchonlyChanged.connect(NotifyWatchonlyChanged);
        spk_man->NotifyCanGetAddressesChanged.connect(NotifyCanGetAddressesChanged);
    }
}