fixes #5235: it's impossible to create filters with invaid searches

It'd be good to include a

```ruby
teardown do 
  assert f.valid?
end
```

since that assertion is done everywhere within this context, and is not specific to each test.