[GHC] #8807: Variable constraints not handled properly in TH