Fix regression in thread name reporting in the profiler.