Avoid adding empty tab param to subsequent search

The code as it was would add an empty tab field to the form if the parameter
was blank, and so it would be added to the URL on a subsequent search.

This is bad for cache-ability.