@shanls96, it will only bring in a sim from the tray if no other sim in the world has the same name. So this will mostly prevent duplicates. If you have it set to have sim names change upon marriage it could start bringing in duplicates as the originals get married and get new names though. I haven't quite figured out if it happens or not, but based upon the feature description...sounds like it would.
I'm 5 weeks into a new save where I had it populate the entire world from my gallery and have yet to notice any duplicates, so either way it's not a huge concern if you have a healthy number of sims in your gallery (I have a few hundred).