I have Thought Hard, and made a few tweaks to ty_co_match. If this passes CI, merge.
ty_co_match
It turns out that the comments were right, but the implementation was slightly wrong.