Aggregation with anonymous variables bugfix