[GHC] #16310: Program fails with "Impossible case alternative" when optimized