When multiple wallets are loaded, switching the active wallet via the main window's wallet selector doesn't update the wallet used by the RPC console. Console commands keep running against the previously selected wallet, so a wallet RPC can be sent to a different wallet than the one shown as active.
The open/create/restore/migrate paths already call RPCConsole::setCurrentWallet(), but the main window selector was missed. Add the call to the central setCurrentWallet().
To reproduce: load two wallets, switch the active wallet in the toolbar, then run a wallet command such as getwalletinfo in the console.