More accurate fix when building the group headers in pivot.