Isn't this just:

  if (walk.isDirectoryFileConflict())

at this point?  Basically we can't rely on Tree anymore, its dead and going away.  So we should be able to do the same thing with TreeWalk/NameConflictTreeWalk... and if we can't we should try to address the problem in those APIs rather than making new code rely on deprecated code.