When releasing array elements, we need to pass 0 as the last argument if we want to copy local chnages back to the Java array. JNI_ABORT should only be used when we don't want the copy, i.e. when the array is read-only. Fixes issue #8278.