BUG-2350: improve performance of data tree merges