Fix a bug where we add way too many AND levels