Pattern-synonym matcher and builder Ids must be *LocalIds*
This easy-to-make mistake meant that pattern-synonym matcher and builder Ids weren't being treated as locally defined by the simpplier. That meant that we never looked up them up in the environment, got an out-of-date unfolding, which made the Simplifier fall into an infinite loop. This was the cause of Trac #98587, but it was quite tricky to find! In a separate patch I'll make Lint check for locally-bound GlobalIds, since they are always an error.
Showing with 172 additions and 3 deletions