Fix reading code for overlapping packets.