[GHC] #8772: ghci should safe history more often