Don't check `cur_ix_masked` against `ring_buffer_mask`. `cur_ix_masked` isn't changing from iteration to iteration, and `max_length` ensures we never find a match long enough to walk off the ring buffer. PiperOrigin-RevId: 624162764