Make tls.record_read more strict about protocol correctness