TL;DR
If two trains have their wait condition satisfied at the same time the one at a higher priority station should end the wait first.What?
Train wait conditions are currently checked in Train ID order (citation needed).Instead check the wait conditions in (Station Priority, ...) order.
Why?
When trying to route items dynamically with train wait conditions and interrupts the behaviour is not as glorious as it is if the train is waiting for the next station in the schedule to become available.I expected that if two trains had a wait condition of "X not full" after which the train would go to X that the train from the higher priority station would go to X but that is not always going to be the case.
IMO doing the wait condition check in train station priority order would bring the behaviour more in line with train priority spirit.