Fixing and/or clauses being improperly optimized out due to off by one issues when only a single document has a value set in a segment