Fixed an issue in SingletonPredicate.

The issue was related to a wrong boolean expression that used 'and' instead of 'or'.