Fix Frege/frege#71 ArrayIndexOutOfBoundsException on JArray.fold