Merge "Revert "Optimize code generation of check-cast and instance-of.""