improving the flattening of structures and arrays in counterexamples