*/
final int size = luceneQueue.size();
List<Integer> toDelete = new ArrayList<Integer>( size );
Map<DuplicatableWork, Integer> workByPosition = new HashMap<DuplicatableWork, Integer>( size );
for ( int index = 0 ; index < size; index++ ) {
LuceneWork work = luceneQueue.get( index );
if ( work instanceof AddLuceneWork ) {
DuplicatableWork dupWork = new DuplicatableWork( work );
final Integer oldIndex = workByPosition.get( dupWork );
if ( oldIndex != null ) {
toDelete.add(oldIndex);