tsg: unwind recursion in tsg_read