Fixed combine_aggregations to call combine_subsitutions correctly.