Hopefully fixed the ugliness in index-value duplication.