Merge "Reduce the scope of CheckJNI."