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

Same for the rest of the tests, I'd say include them in a context and refactor the common parts, like some assertions, some objects created.