SI-7763 Don't elide CHECK_CAST in dead code elimination.

Even if the result isn't used, the potential ClassCastException
is observable, so we must retain them.