My `bitcoin.conf`:
```
$ cat ~/.bitcoin/bitcoin.conf 
[regtest]
blockfilterindex=basic
```
And if I launch `bitcoind` specifying `..=basic` *again*, like this:
```
$ ./bitcoind -chain=regtest -blockfilterindex=basic
```

I get this error (full log below):
```
EXCEPTION: 15dbwrapper_error       
Fatal LevelDB error: IO error: lock /home/vincas/.bitcoin/regtest/indexes/blockfilter/basic/db/LOCK: already held by process       
bitcoin in AppInit()
```
Does not reproduce if I use `-blockfilterindex=1` twice.

**Expected behavior**

Should not fatal-away due to redundant command line arguments.

**Actual behavior**

`bitcoind` exits with Fatal LevelDB error.

**To reproduce**

* Debian Sid
* `../configure --with-incompatible-bdb --with-gui=no` (`incompatile` to use Debian's bdb)
* Have `bitcoin.conf` as noted before.
* Run `./bitcoind -chain=regtest -blockfilterindex=basic`

**System information**

Bitcoin Core v0.19.0.1 and from current master
Debian Sid amd64.
Same with `bitcoind` and `bitcoin-qt`

Full output:
```
2019-12-05T18:56:30Z Feeding 34499 bytes of environment data into RNG
2019-12-05T18:56:30Z Bitcoin Core version v0.19.99.0-6fff333c9 (release build)
2019-12-05T18:56:30Z Validating signatures for all blocks.
2019-12-05T18:56:30Z Setting nMinimumChainWork=0000000000000000000000000000000000000000000000000000000000000000
2019-12-05T18:56:30Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
2019-12-05T18:56:30Z Using RdRand as an additional entropy source
2019-12-05T18:56:30Z Default data directory /home/vincas/.bitcoin
2019-12-05T18:56:30Z Using data directory /home/vincas/.bitcoin/regtest
2019-12-05T18:56:30Z Config file: /home/vincas/.bitcoin/bitcoin.conf
2019-12-05T18:56:30Z Using at most 125 automatic connections (1024 file descriptors available)
2019-12-05T18:56:30Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2019-12-05T18:56:30Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2019-12-05T18:56:30Z Script verification uses 7 additional threads
2019-12-05T18:56:30Z scheduler thread start
2019-12-05T18:56:30Z HTTP: creating work queue of depth 16
2019-12-05T18:56:30Z No rpcpassword set - using random cookie authentication.
2019-12-05T18:56:30Z Generated RPC authentication cookie /home/vincas/.bitcoin/regtest/.cookie
2019-12-05T18:56:30Z HTTP: starting 4 worker threads
2019-12-05T18:56:30Z Using wallet directory /home/vincas/.bitcoin/regtest/wallets
2019-12-05T18:56:30Z init message: Verifying wallet(s)...
2019-12-05T18:56:30Z Using BerkeleyDB version Berkeley DB 5.3.28: (September  9, 2013)
2019-12-05T18:56:30Z Using wallet /home/vincas/.bitcoin/regtest/wallets
2019-12-05T18:56:30Z BerkeleyEnvironment::Open: LogDir=/home/vincas/.bitcoin/regtest/wallets/database ErrorFile=/home/vincas/.bitcoin/regtest/wallets/db.log
2019-12-05T18:56:30Z init message: Loading banlist...
2019-12-05T18:56:30Z ERROR: DeserializeFileDB: Failed to open file /home/vincas/.bitcoin/regtest/banlist.dat
2019-12-05T18:56:30Z Invalid or missing banlist.dat; recreating
2019-12-05T18:56:30Z Cache configuration:
2019-12-05T18:56:30Z * Using 2.0 MiB for block index database
2019-12-05T18:56:30Z * Using 28.0 MiB for basic block filter index database
2019-12-05T18:56:30Z * Using 28.0 MiB for basic block filter index database
2019-12-05T18:56:30Z * Using 8.0 MiB for chain state database
2019-12-05T18:56:30Z * Using 384.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)
2019-12-05T18:56:30Z init message: Loading block index...
2019-12-05T18:56:30Z Opening LevelDB in /home/vincas/.bitcoin/regtest/blocks/index
2019-12-05T18:56:30Z Opened LevelDB successfully
2019-12-05T18:56:30Z Using obfuscation key for /home/vincas/.bitcoin/regtest/blocks/index: 0000000000000000
2019-12-05T18:56:30Z LoadBlockIndexDB: last block file = 0
2019-12-05T18:56:30Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0...0, time=1970-01-01...1970-01-01)
2019-12-05T18:56:30Z Checking all blk files are present...
2019-12-05T18:56:30Z Initializing databases...
2019-12-05T18:56:30Z Pre-allocating up to position 0x1000000 in blk00000.dat
2019-12-05T18:56:30Z Opening LevelDB in /home/vincas/.bitcoin/regtest/chainstate
2019-12-05T18:56:30Z Opened LevelDB successfully
2019-12-05T18:56:30Z Wrote new obfuscate key for /home/vincas/.bitcoin/regtest/chainstate: 531e5e9ac4b7503b
2019-12-05T18:56:30Z Using obfuscation key for /home/vincas/.bitcoin/regtest/chainstate: 531e5e9ac4b7503b
2019-12-05T18:56:30Z init message: Rewinding blocks...
2019-12-05T18:56:30Z  block index              45ms
2019-12-05T18:56:30Z Opening LevelDB in /home/vincas/.bitcoin/regtest/indexes/blockfilter/basic/db
2019-12-05T18:56:30Z Opened LevelDB successfully
2019-12-05T18:56:30Z Using obfuscation key for /home/vincas/.bitcoin/regtest/indexes/blockfilter/basic/db: 0000000000000000
2019-12-05T18:56:30Z Opening LevelDB in /home/vincas/.bitcoin/regtest/indexes/blockfilter/basic/db
2019-12-05T18:56:30Z basic block filter index thread start
2019-12-05T18:56:30Z basic block filter index is enabled
2019-12-05T18:56:30Z basic block filter index thread exit
2019-12-05T18:56:30Z Fatal LevelDB error: IO error: lock /home/vincas/.bitcoin/regtest/indexes/blockfilter/basic/db/LOCK: already held by process
2019-12-05T18:56:30Z You can use -debug=leveldb to get more complete diagnostic messages
2019-12-05T18:56:30Z 

************************
EXCEPTION: 15dbwrapper_error       
Fatal LevelDB error: IO error: lock /home/vincas/.bitcoin/regtest/indexes/blockfilter/basic/db/LOCK: already held by process       
bitcoin in AppInit()       



************************
EXCEPTION: 15dbwrapper_error       
Fatal LevelDB error: IO error: lock /home/vincas/.bitcoin/regtest/indexes/blockfilter/basic/db/LOCK: already held by process       
bitcoin in AppInit()       

2019-12-05T18:56:30Z Shutdown: In progress...
2019-12-05T18:56:30Z scheduler thread interrupt
2019-12-05T18:56:30Z Shutdown: done

```
#if HAVE_SYSTEM
    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)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
#endif
    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()), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-blocksdir=<dir>", "Specify directory to hold blocks subdirectory for *.dat files (default: <datadir>)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
#if HAVE_SYSTEM
    gArgs.AddArg("-blocknotify=<cmd>", "Execute command when the best block changes (%s in cmd is replaced by block hash)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
#endif
    gArgs.AddArg("-blockreconstructionextratxn=<n>", strprintf("Extra transactions to keep in memory for compact block reconstructions (default: %u)", DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-blocksonly", strprintf("Whether to reject transactions from network peers. Transactions from the wallet, RPC and relay whitelisted inbound peers are not affected. (default: %u)", DEFAULT_BLOCKSONLY), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-conf=<file>", strprintf("Specify configuration file. Relative paths will be prefixed by datadir location. (default: %s)", BITCOIN_CONF_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-datadir=<dir>", "Specify data directory", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-dbbatchsize", strprintf("Maximum database write batch size in bytes (default: %u)", nDefaultDbBatchSize), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-dbcache=<n>", strprintf("Maximum database cache size <n> MiB (%d to %d, default: %d). In addition, unused mempool memory is shared for this cache (see -maxmempool).", nMinDbCache, nMaxDbCache, nDefaultDbCache), ArgsManager::ALLOW_ANY, 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), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-feefilter", strprintf("Tell other nodes to filter invs to us by our mempool min fee (default: %u)", DEFAULT_FEEFILTER), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-includeconf=<file>", "Specify additional configuration file, relative to the -datadir path (only useable from configuration file, not command line)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-loadblock=<file>", "Imports blocks from external file on startup", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-maxmempool=<n>", strprintf("Keep the transaction memory pool below <n> megabytes (default: %u)", DEFAULT_MAX_MEMPOOL_SIZE), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-maxorphantx=<n>", strprintf("Keep at most <n> unconnectable transactions in memory (default: %u)", DEFAULT_MAX_ORPHAN_TRANSACTIONS), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-mempoolexpiry=<n>", strprintf("Do not keep transactions in the mempool longer than <n> hours (default: %u)", DEFAULT_MEMPOOL_EXPIRY), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-minimumchainwork=<hex>", strprintf("Minimum work assumed to exist on a valid chain in hex (default: %s, testnet: %s)", defaultChainParams->GetConsensus().nMinimumChainWork.GetHex(), testnetChainParams->GetConsensus().nMinimumChainWork.GetHex()), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-par=<n>", strprintf("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)",
        -GetNumCores(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-persistmempool", strprintf("Whether to save the mempool on shutdown and load on restart (default: %u)", DEFAULT_PERSIST_MEMPOOL), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-pid=<file>", strprintf("Specify pid file. Relative paths will be prefixed by a net-specific datadir location. (default: %s)", BITCOIN_PID_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-prune=<n>", strprintf("Reduce storage requirements by enabling pruning (deleting) of old blocks. This allows the pruneblockchain RPC to be called to delete specific blocks, and enables automatic pruning of old blocks if a target size in MiB is provided. This mode is incompatible with -txindex and -rescan. "
            "Warning: Reverting this setting requires re-downloading the entire blockchain. "
            "(default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >=%u = automatically prune block files to stay under the specified target size in MiB)", MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    gArgs.AddArg("-reindex", "Rebuild chain state and block index from the blk*.dat files on disk", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);