The additional palette sampler wasn't accounted for in the original PR.
The index values are round numbers. Checking agaist the half-values improves robustness against small floating point delta errors that occur on some GPUs.