I just downloaded Xander's latest driver and when compiling with it, it gave me a warning on hitechnic_irseeker-v2.h:
*Warning*:Comparison between 'signed' and 'unsigned' operands.
I think RobotC doesn't like the comparison of (HTIRS2_I2CReply[iMax - 1] > (HTIRS2_I2CReply[iMax]/2). When you divide HTIRS2_I2CReply[iMax]/2, the compiler converted the unsigned value to signed. So you are comparing a unsigned value with a signed value and hence the warning.
However, even if I type cast it back to ubyte, the warning does not go away. I think that's a RobotC bug.
I simplified the code to the following to demonstrate the issue.