Fixed an issue in Optimize() when encounter expression like "TRUE AND TRUE"