Fix data race on TSX-GL after optimizations