[tsan] two more compile-time optimizations: