Collapse same-text index entries.