[Git][ghc/ghc][wip/T27994] niFixSubst: invert test and add a counter to detect loop