[Git][ghc/ghc][master] Fix race condition between flushEventLog and start/endEventLogging.