I am not sure what you mean by the modularity principle or how it relates to repeating preceding steps.
In any case, the analysis group works by avoiding double counting. For example, if you define analysis group A1, then all contributions attributable to A1 that are also included in A5 will be accounted for under A1 when you examine the results. This is why, when you change A5, the results behaves accordingly.
This is also explained toward the end of the following page: https://greendelta.github.io/openLCA2-manual/res_analysis/res_analysis_groups.html?highlight=analysis#new--analysis-groups
Therefore, in your case, since you are looping processes with one another, I recommend reading the results from the contribution tree.
Final recommendation: there was a bug in the analysis group feature that has now been fixed in openLCA 2.6. This issue was identified in a former question:https://ask.openlca.org/9846/specific-application-of-analysis-groups