Correctly change aggregation mode in all cases, unit tests.

Fixed broken unit tests, and in the process corrected an
issue where we changed aggregation mode in some cases where
is wasn't needed.  (When updating but no values change.)
2 files changed