Merge "Add more checking to ReleasePrimitiveArray."