when adding duplicates in add_cert_dir. PR: 3261 Reported by: Marian Done (cherry picked from commit 758954e0)