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)
#else
    hidden_args.emplace_back("-upnp");
#endif
    gArgs.AddArg("-whitebind=<addr>", "Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6", false, OptionsCategory::CONNECTION);
    gArgs.AddArg("-whitelist=<IP address or network>", "Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times."
        " Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway", false, OptionsCategory::CONNECTION);
    g_wallet_init_interface.AddWalletOptions();
#if ENABLE_ZMQ
    gArgs.AddArg("-zmqpubhashblock=<address>", "Enable publish hash block in <address>", false, OptionsCategory::ZMQ);
    gArgs.AddArg("-zmqpubhashtx=<address>", "Enable publish hash transaction in <address>", false, OptionsCategory::ZMQ);
    gArgs.AddArg("-zmqpubrawblock=<address>", "Enable publish raw block in <address>", false, OptionsCategory::ZMQ);
    gArgs.AddArg("-zmqpubrawtx=<address>", "Enable publish raw transaction in <address>", false, OptionsCategory::ZMQ);
    gArgs.AddArg("-zmqpubhashblockhwm=<n>", strprintf("Set publish hash block outbound message high water mark (default: %d)", CZMQAbstractNotifier::DEFAULT_ZMQ_SNDHWM), false, OptionsCategory::ZMQ);
    gArgs.AddArg("-zmqpubhashtxhwm=<n>", strprintf("Set publish hash transaction outbound message high water mark (default: %d)", CZMQAbstractNotifier::DEFAULT_ZMQ_SNDHWM), false, OptionsCategory::ZMQ);
    gArgs.AddArg("-zmqpubrawblockhwm=<n>", strprintf("Set publish raw block outbound message high water mark (default: %d)", CZMQAbstractNotifier::DEFAULT_ZMQ_SNDHWM), false, OptionsCategory::ZMQ);
    gArgs.AddArg("-zmqpubrawtxhwm=<n>", strprintf("Set publish raw transaction outbound message high water mark (default: %d)", CZMQAbstractNotifier::DEFAULT_ZMQ_SNDHWM), false, OptionsCategory::ZMQ);
#else
    hidden_args.emplace_back("-zmqpubhashblock=<address>");
    hidden_args.emplace_back("-zmqpubhashtx=<address>");
    hidden_args.emplace_back("-zmqpubrawblock=<address>");
    hidden_args.emplace_back("-zmqpubrawtx=<address>");
    hidden_args.emplace_back("-zmqpubhashblockhwm=<n>");
    hidden_args.emplace_back("-zmqpubhashtxhwm=<n>");
    hidden_args.emplace_back("-zmqpubrawblockhwm=<n>");
    hidden_args.emplace_back("-zmqpubrawtxhwm=<n>");
#endif
    gArgs.AddArg("-checkblocks=<n>", strprintf("How many blocks to check at startup (default: %u, 0 = all)", DEFAULT_CHECKBLOCKS), true, OptionsCategory::DEBUG_TEST);
    gArgs.AddArg("-checklevel=<n>", strprintf("How thorough the block verification of -checkblocks is: "
        "level 0 reads the blocks from disk, "
        "level 1 verifies block validity, "