Swap panes in advanced inventory

Selecting a pane you are already viewing will swap your active panes around. Fixes #6215