Fix #9663.

When clearing the filter state, don't disable filtering entirely if we
have a ref filter present. Otherwise, it won't be invoked again
until the next time a typeahead filter is engaged.