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).
for (const CTxOut &txout : wtx.tx->vout) {
                
                for (const auto &keyid : GetAffectedKeys(txout.scriptPubKey, *spk_man)) {
                    
                    std::map<CKeyID, int>::iterator rit = mapKeyFirstBlock.find(keyid);
                    if (rit != mapKeyFirstBlock.end() && *height < rit->second)
                        rit->second = *height;
                }
            }
        }
    }
    
    for (const auto& entry : mapKeyFirstBlock)
        mapKeyBirth[entry.first] = locked_chain.getBlockTime(entry.second) - TIMESTAMP_WINDOW; 
}
/**
 * Compute smart timestamp for a transaction being added to the wallet.
 *
 * Logic:
 * - If sending a transaction, assign its timestamp to the current time.
 * - If receiving a transaction outside a block, assign its timestamp to the
 *   current time.
 * - If receiving a block with a future timestamp, assign all its (not already
 *   known) transactions' timestamps to the current time.
 * - If receiving a block with a past timestamp, before the most recent known
 *   transaction (that we care about), assign all its (not already known)
 *   transactions' timestamps to the same timestamp as that most-recent-known
 *   transaction.
 * - If receiving a block with a past timestamp, but after the most recent known
 *   transaction, assign all its (not already known) transactions' timestamps to