Sort sparse indexes, and merge them into the global one.