Fix potential crash in tls_construct_finished.