Method DumperSupport::calculate_array_max_length(AbstractDumpWriter* writer, arrayOop array, short header_size) computes the size of an array element before calling DumperSupport::calculate_array_max_length(AbstractDumpWriter* writer, arrayOop array, int type_size, short header_size), but the computation is incorrect for flat arrays.