variables according to their clock dependencies, which is wrong since that order is partial. I've implemented a topological sort instead.