Fix appending packets

The zero-copy buffer caused overwriting of data if multiple chunks were
read.