Windows: Do not reset cm_buf.offset on error