Fixed Search by Tag NPEs (rebased onto develop)



This is the same as gh-2605 but rebased onto develop.

----

See Ticket https://trac.openmicroscopy.org.uk/ome/ticket/12368
If there are empty tagsets Insight crashed with a NPE after a tag was selected in the tag selection dialog (search panel).
Test:
Make sure there is at least one empty tagset; Open the search panel; Open the tag selection dialog by clicking on the tag icon; select some tags to search for.