Fixed handling of multiple occurrences of the same index entry.