Fixes problem where predicates are evaluated wrongly in NOT
Merge pull request #2446 from systay/2.0-not-and-problems

Fixes problem where predicates are evaluated wrongly in NOT