I think we would just need to to presort the `IndexEntry`s by `Path` with `repo.PathComparer`.

A better option might be to let LINQ do the grouping:
```csharp
        private static Conflict BuildConflict(string path, IEnumerable<IndexEntry> entries)
        {
            IndexEntry ancestor = null, ours = null, theirs = null;

            foreach (var entry in entries)
            {
                switch (entry.StageLevel)
                {
                    case StageLevel.Ancestor:
                        ancestor = entry;
                        break;
                    case StageLevel.Ours:
                        ours = entry;
                        break;
                    case StageLevel.Theirs:
                        theirs = entry;
                        break;
                    default:
                        throw new InvalidOperationException(string.Format(
                            CultureInfo.InvariantCulture,
                            "Entry '{0}' bears an unexpected StageLevel '{1}'",
                            entry.Path, entry.StageLevel));
                }
            }

            return new Conflict(ancestor, ours, theirs);
        }

        public virtual IEnumerator<Conflict> GetEnumerator()
        {
            return repo.Index
                       .Where(e => e.StageLevel != StageLevel.Staged)
                       .GroupBy(e => e.Path, BuildConflict, repo.PathComparer)
                       .GetEnumerator();
        }
```