Merge id sequences