Comment: explain why we copy the prefix before growing the buffer.