Fixed for DLS cleanup by kenruof.
Sets the selected while unoccupied junctions to specified states. This rule is the same as the original set junctions rule, except that the rule checks if any of the selected junctions are occupied. If so, it waits until all the junctions are cleared, thus avoiding derailment.