fix buffer.Truncate to handle non-zero resets, and remove detection of invalid usage