The IDL-description for the com.sun.star.text.MailMerge-Service specifies a Property "Selection" which allows to mailmerge just a subset of elements in the datasource.
The elements that need to be provided in the UNO-Sequence "Selection" are considered as "bookmarks of the ResultSet". Therefore LibreOffice transforms bookmarks into indizes in a buggy loop in http://opengrok.libreoffice.org/xref/core/sw/source/uibase/uno/unomailmerge.cxx#570. Here, the pointer pTranslated is never incremented. All translated elements from the origin Selection sequence are written to the first position of the new index list.
The bug is very old and already contained in OpenOffice 3.2.1. It seems that nobody ever really has tested this feature.