Fix bug in handling nested negation.