Time aggregation functions: Remove unneeded extra time dimension in certain cases See merge request !78