Backport 3306: Clip: Fix edgeInterpolationIndexToUnique creation bug
Backport of !3306 (merged)
This is the correct order:
- Copy the existing edges (which include duplicates)
- Sort the copies edges
- Remove the duplicate edges from the copied edges so that they are unique
- Create a edgeInterpolationIndexToUnique map by querying each edge (including duplicates) and find the which unique id they have by looking into the unique copied edges
(cherry picked from commit 0cbc72eb)