#694 Aggregation with large number of aggregation areas hangs - fixes for failing unit tests.