Fix exception when adding duplicate keywords.