fixed the terrible old go code, partially implemented an ordered Map so iterating through dfs results would be deterministic. Maybe something better could be done here though