Stopped generating unnecessary ModIds for Dests.
Fixed a bug where we weren't processing nodes in the right order by switching
from a PriorityQueue to a TreeSet.