MMS use irf_latched_idx for identifying latched probes and ensure bits do not overflow. Also include a small bugfix for irf_latched_idx.