Correct dim coord behaviour for aggregated by.
Merge pull request #681 from bjlittle/agg_fix

Correct dim coord behaviour for aggregated by.