[GHC] #12551: Make type indices take local constraints into account in type instance declaration