Fix ignoring of duplicates when traversing history