On master, reported on IRC, appveyor and travis (macos):

Example backtrace:

```
wallet_multiwallet.py --usecli failed, Duration: 56 s
stdout:
2018-12-10T19:52:57.293000Z TestFramework (INFO): Initializing test directory C:\Users\appveyor\AppData\Local\Temp\1\test_runner_20181210_194416\wallet_multiwallet_70
2018-12-10T19:53:18.569000Z TestFramework (INFO): Do not allow -zapwallettxes with multiwallet
2018-12-10T19:53:19.332000Z TestFramework (INFO): Do not allow -salvagewallet with multiwallet
2018-12-10T19:53:19.839000Z TestFramework (INFO): Do not allow -upgradewallet with multiwallet
2018-12-10T19:53:32.857000Z TestFramework (INFO): Check for per-wallet settxfee call
2018-12-10T19:53:33.296000Z TestFramework (INFO): Test dynamic wallet loading
2018-12-10T19:53:36.907000Z TestFramework (INFO): Load first wallet
2018-12-10T19:53:37.476000Z TestFramework (INFO): Load second wallet
2018-12-10T19:53:38.049000Z TestFramework (INFO): Load remaining wallets
2018-12-10T19:53:41.485000Z TestFramework (INFO): Test dynamic wallet creation.
2018-12-10T19:53:43.012000Z TestFramework (INFO): Test dynamic wallet unloading
2018-12-10T19:53:47.773000Z TestFramework (INFO): Test wallet backup
2018-12-10T19:53:52.517000Z TestFramework (ERROR): JSONRPC error
Traceback (most recent call last):
  File "C:\projects\bitcoin\test\functional\test_framework\test_framework.py", line 173, in main
    self.run_test()
  File "C:\projects\bitcoin/test/functional/wallet_multiwallet.py", line 315, in run_test
    self.nodes[0].loadwallet(wallet_name)
  File "C:\projects\bitcoin\test\functional\test_framework\test_node.py", line 400, in __call__
    return self.cli.send_cli(self.command, *args, **kwargs)
  File "C:\projects\bitcoin\test\functional\test_framework\test_node.py", line 453, in send_cli
    raise JSONRPCException(dict(code=int(code), message=message))
test_framework.authproxy.JSONRPCException: Wallet file verification failed: Error loading wallet w2. Duplicate -wallet filename specified. (-4)
{
    const auto defaultBaseParams = CreateBaseChainParams(CBaseChainParams::MAIN);
    const auto testnetBaseParams = CreateBaseChainParams(CBaseChainParams::TESTNET);
    const auto regtestBaseParams = CreateBaseChainParams(CBaseChainParams::REGTEST);
    const auto defaultChainParams = CreateChainParams(CBaseChainParams::MAIN);
    const auto testnetChainParams = CreateChainParams(CBaseChainParams::TESTNET);
    const auto regtestChainParams = CreateChainParams(CBaseChainParams::REGTEST);
    
    std::vector<std::string> hidden_args = {"-h", "-help",
        "-dbcrashratio", "-forcecompactdb",
        
        "-allowselfsignedrootcertificates", "-choosedatadir", "-lang=<lang>", "-min", "-resetguisettings", "-rootcertificates=<file>", "-splash", "-uiplatform"};
    
    
    gArgs.AddArg("-?", "Print this help message and exit", false, OptionsCategory::OPTIONS);
    gArgs.AddArg("-version", "Print version and exit", false, OptionsCategory::OPTIONS);
    gArgs.AddArg("-alertnotify=<cmd>", "Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)", false, OptionsCategory::OPTIONS);
    gArgs.AddArg("-assumevalid=<hex>", strprintf("If this block is in the chain assume that it and its ancestors are valid and potentially skip their script verification (0 to verify all, default: %s, testnet: %s)", defaultChainParams->GetConsensus().defaultAssumeValid.GetHex(), testnetChainParams->GetConsensus().defaultAssumeValid.GetHex()), false, OptionsCategory::OPTIONS);
    gArgs.AddArg("-blocksdir=<dir>", "Specify blocks directory (default: <datadir>/blocks)", false, OptionsCategory::OPTIONS);
    gArgs.AddArg("-blocknotify=<cmd>", "Execute command when the best block changes (%s in cmd is replaced by block hash)", false, OptionsCategory::OPTIONS);
    gArgs.AddArg("-blockreconstructionextratxn=<n>", strprintf("Extra transactions to keep in memory for compact block reconstructions (default: %u)", DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN), false, OptionsCategory::OPTIONS);
    gArgs.AddArg("-blocksonly", strprintf("Whether to operate in a blocks only mode (default: %u)", DEFAULT_BLOCKSONLY), true, OptionsCategory::OPTIONS);
    gArgs.AddArg("-conf=<file>", strprintf("Specify configuration file. Relative paths will be prefixed by datadir location. (default: %s)", BITCOIN_CONF_FILENAME), false, OptionsCategory::OPTIONS);
    gArgs.AddArg("-datadir=<dir>", "Specify data directory", false, OptionsCategory::OPTIONS);
    gArgs.AddArg("-dbbatchsize", strprintf("Maximum database write batch size in bytes (default: %u)", nDefaultDbBatchSize), true, OptionsCategory::OPTIONS);
    gArgs.AddArg("-dbcache=<n>", strprintf("Set database cache size in megabytes (%d to %d, default: %d)", nMinDbCache, nMaxDbCache, nDefaultDbCache), false, OptionsCategory::OPTIONS);
    gArgs.AddArg("-debuglogfile=<file>", strprintf("Specify location of debug log file. Relative paths will be prefixed by a net-specific datadir location. (-nodebuglogfile to disable; default: %s)", DEFAULT_DEBUGLOGFILE), false, OptionsCategory::OPTIONS);
    gArgs.AddArg("-feefilter", strprintf("Tell other nodes to filter invs to us by our mempool min fee (default: %u)", DEFAULT_FEEFILTER), true, OptionsCategory::OPTIONS);
    gArgs.AddArg("-includeconf=<file>", "Specify additional configuration file, relative to the -datadir path (only useable from configuration file, not command line)", false, OptionsCategory::OPTIONS);