Better typecase check

Only allow matching on polymorphic arguments if they have been refined
to something concrete due to some other argument by the time they're
elaborated.