Refactor: scheduler: check for invalid orderings when applying orderings
... in stage 7, not when creating the transition graph XML in stage 8.
This is logically a more appropriate place, and will help with future
changes. It is functionally the same, except the order in which inputs
are checked may differ, which means that graph_has_loop() may choose to
disable different orderings.