return objects by id, since references to vector elements get invalidated
unify usage of merge and unmerge functions
(all selected objects but the first get merged into/unmerged from the first)