Added an incrementIndices() private method for safely adjusting all indices simultaneously.