Fixes indexing/out of bounds bug in method 'particle_indices_of_slice()'.