Fixed javaAfterNative custom code in non-void methods, so that it's called
between the native method call and the return statement.