Use binary visitors for predicate checks.

Relates #27.
Fix bug causing premature query termination.