Fix for #34: track current txn for thread.