This happens after #7105 when doing a reindex in regtest. Can't reproduce in mainnet or testnet. Without wallet or without reindex I can run just fine.
$ src/qt/bitcoin-qt -printtoconsole -regtest -datadir=/tmp/test11 -reindex
bitcoin-qt: wallet/wallet.cpp:776: void CWallet::MarkConflicted(const uint256&, const uint256&): Assertion `mapBlockIndex.count(hashBlock)' failed.
Aborted (core dumped)