Merge: #11866: Eliminate race condition in the computation of names for new threads.