The crash occurs because WalletController::removeAndDeleteWallet is called twice for the
same wallet model: first in the GUI's button connected function WalletController::closeWallet,
and then again when the backend emits the WalletModel::unload signal.
This causes the issue because removeAndDeleteWallet inlines an erase(std::remove()).
So, if std::remove returns an iterator to the end (indicating the element wasn't found
because it was already erased), the subsequent call to erase leads to an undefined behavior.
Test Notes: Try closing any wallet using the toolbar button in the GUI. It will crash in master, but not here.