My bad, it's not the "BranchStackList" that's returning items out-of-order, its the DirectoryEntryList iterator. Time to read up on STL list iterators I suppose...