Cannot disable active tab in web right hand panel, switch away first

To reproduce bug on OmeroWeb:

* Select image in the left tree
* Click preview tab in right hand panel
* Click the root of the left tree
* Click preview tab in right hand panel -> 404

Fix: switch away from active tab before disabling it