Preserve selection on tab reordering