When starting bitcoin-qt with `-nowallet` to explicitly not load any wallets initially, attempting to load a wallet using the Open Wallet menu option results in the wallet being loaded but the GUI does not change. The wallet is reachable via the RPC interface but the GUI still says that no wallets are loaded.
if (QApplication::activeModalWidget()) {
            connect(qApp, &QApplication::focusWindowChanged, wallet_model, [this, wallet_model]() {
                if (!QApplication::activeModalWidget()) {
                    removeAndDeleteWallet(wallet_model);
                }
            }, Qt::QueuedConnection);
        } else {
            removeAndDeleteWallet(wallet_model);
        }
    });
    
    connect(wallet_model, &WalletModel::coinsSent, this, &WalletController::coinsSent);
    
    if (QThread::currentThread() == thread()) {
        addWallet(wallet_model);
    } else {
        
        wallet_model->moveToThread(thread());
        bool invoked = QMetaObject::invokeMethod(this, "addWallet", Qt::QueuedConnection, Q_ARG(WalletModel*, wallet_model));
        assert(invoked);
    }
    return wallet_model;
}
void WalletController::addWallet(WalletModel* wallet_model)
{
    
    wallet_model->setParent(this);
    Q_EMIT walletAdded(wallet_model);
}
void WalletController::removeAndDeleteWallet(WalletModel* wallet_model)