Hi Don,
It's an idiosyncrasy of the algorithm such that it things those two piece at the end are distinct trails since they do not cross each other for a fair distance.
You can solve it by dragging one of the last points over to create an intersection. See the attached file. It ends up as one track line after running the network code on it.
Cheers