If we are in a file/folder conflict, we shouldn't ever see the folder.  A recursive TreeWalk doesn't return folders, only files.

If "foo" is a file in the dirCache, and now a directory in the workingTree, and the workingTree also has "foo/bar", we should see during iteration:

 First Result:
    dirCacheIterator = "foo"
    workingTreeIterator = null

  Second Result
    dirCacheIterator = null
    workingTreeIterator = "foo/bar"

Now if you changed the type of TreeWalk to NameConflictTreeWalk then this may change a little.  In a recursive NameConflictTreeWalk we may very well wind up with a tree when there is also a file.

So I think this change is safe, because we should never be seeing a tree type on any of the iterators, as the recursive TreeWalk won't return them.