Suppose that there are two files and they have the same variables. It's pretty easy to make an aggregation out of them. For example, see the first attachment. The first file is used as a template so we get variables from it and a variable for the aggregation. The problem is that the 'aggregation' covers several files but there's no way to know which file the 'non-aggregated' variables' values came from.
The fix is to remove the variables that are not part of the aggregation.
Should we put something in the code to enforce this.