Fix bug 2736, duplicate removal