TxnContext should store mode in TLS too.