Aperture's recognition of duplicate images is very restrictive. For an image to be recognized as a duplicate the filenames need to be identical, the file size, and the date. Aperture will check that when importing images and avoid to import duplicates, if you enable the duplicate detection.
But this will not always work when merging libraries. Then duplicate detection will work best, when the second library has originally been exported from the first library and the libraries share projects. When merging independently created libraries containing the same images, Aperture will not necessarily recognize the duplicates. I just checked again - created two libraries, imported into both the same folder with 16 images, then merged the second library into the first. The merge result was a library containing two projects with identical images.
You can merge iPhoto libraries using Aperture by them into one of the libraries, but there are no tools provided to avoid duplicates, if the libraries are not copies of each other.
Aperture 3.3: How to use Aperture to merge iPhoto libraries
Regards
Léonie