Fix home button on catalog

Was broken, closed the catalog when query was blank even when not
at catalog's root.

Fixes #3722