Sieve duplicate detection not working as expected