for more efficient LatestMap merge
Note that all the sorting and ID calculation code in the old SmartMerger
was done so we could cache of intermediate results. But we disabled
caching some time ago, so there is no point carrying around all the
supporting code.