Add filter/discriminator criteria at Query-level, not Expr

Fixes #596