handle edge case for aggregation/upgrade scenario

See the lengthy comment I added in PopulateCacheIndex for the details.
Merge remote-tracking branch 'origin/master' into feature/bz1069606-rebase-eap-63