Fix calculation of dataByteIndex.