Fix crah in the optimizer profiler.