Merge "Fix SamplingProfiler to handle null group on thread termination"