This grouping logic is related to how the figures are currently organized in memory.
All the figures from a GlobalData.DataSet are grouped in the same block (= one row in your example).
The figures that are grouped on a row are all loaded on the same DataSet, either because they depend on the same DataFile, or because they do not depend on any DataFile.
The order in which you open the different figures can lead to different structures in memory, and threfore different grouping.