Fix OptimizeMax to handle an odd case where one of the max operands