Remove duplicate labels. Closes #1514