The _collect_duplicates uses a set for duplicates. This
does not work when the values in the list are dictionaries.
Instead of using a set, use a list and extend the condition to
only add to the list if seen and not already in dups.
Closes-Bug: #1956785
Change-Id: Iad627bcfb95699febd504d7dc7fc9e8a7d813a9e