Improve negated OR check, fixes #4