Rollback topological sorting

I can't make it fail locally. Let's see if TeamCity is better at generating random issues.