Merge "Improve robustness of thread name fixing"