It appears it is some sort of predictive algorithm. It sweeps the focus, then selects one. On the unmodified cameras it picks well, but once modified it is off. I wonder if it is sweeping the focus then deciding to focus to the fixed "infinity" setting. In the case of the IR modified cameras "infinity" isn't correct anymore. So even though it appears to be able to focus to the right point it doesn't.
The oddest part is the fact that some of the cams work great (same models), some work poorly. Maybe it is just manufacturing tolerances and luck of the draw.