fdo#72774: Generate correct group items for the year group.

This changes bring it back to the same algorithm used in 3.5.

Change-Id: I16855cef1de133a1f886baa823d5b0d2b148e781
fdo#72774: Write test to ensure correct group items in pivot cache on load.

Change-Id: Ib9656b8e321a12a6f971f5775aaed235eac8df58