Delete duplicated nodes from a list