Remove repeated words (fixes #1591)