Properly replacing duplicate redirected entries in replaceRedirectedEntries()