Make the match exhaustive, adding handling for anonymous types and tuple coercions on the way. Also, exit early when type errors are detected, to avoid error cascades and the like.