Hi Andres,
thanks for your help. Somehow I mixed up the old version of the script I downloaded long time ago with the new version distributed through update system. Latest version works without problem, no duplicates. My mistake, sorry.
regards, Zbynek