Giving a friendlier diagnostic for incorrect code, at the cost of being
slower when compiling correct programs, isn't obviously a good tradeoff.

It's not a friendlier diagnostic -- the compiler now *terminates*.

Running forever is pretty unfriendly.

I understand how much Apple cares about compile-times, but there's plenty
of places to go to make improvements. Let's focus on the ones that are
just stupid algorithmic nonsense, not the ones that actually made the
compiler more correct.

Especially given that this function is going to become basically unused in
the relatively near future, it seems to me that this is a bad place to
spend too much effort. Stuff like reducing the number of temporary
template argument vectors we allocate would probably be a bigger win, and
would provide long-term benefit.