Use DISTINCT ON to make in_taxon scope return truly distinct products in PostgreSQL

Fixes #2851