Better handling of collection reordering (with doubles)