It currently crashes if the samples change such that the persisted position is no longer within bounds. PiperOrigin-RevId: 312554337