Merge "Sanity checks in JNI code for closure creation" into mnc-dev