[Git][ghc/ghc][wip/andreask/fix-prof-segv] Fix a profiling race condition resulting in segfaults.