Fixes #416 - interaction between search & filter

Plus tests!

r? @magsout