Fix bug where NOT operator could be mutated from AND/OR