lisa.utils: Fix deduplicate()
The current behavior does keep the occurence it's asked to keep, but inserts them at the wrong position in the output.
The current behavior does keep the occurence it's asked to keep, but inserts them at the wrong position in the output.