[GHC] #10371: GHC fails to inline and specialize a function