profiler: Consolidate duplicate branches in ProfilerOutputText