Fixes 3594
Merge pull request #3624 from deadlybutter/duplicatesearchfix

Fixes #3594