Tests for .algorithms.topological_order (+fixes!)