In theory I could check all stations connected and than traverse the circuit network for any conditions related to train ids ... but this would have such an impact on performance that it simply is not worth the effort and nearly impossible to make reliable (the circuit value could be anything, anywhere ... ).
If you rely on a train ID to stay the same in your circuitry you should probably reconsider your design and make it based of the trains content (or lack thereof) if you want to use this mod. Or just let the train schedule take care of what goes where and pretty much only read train content or send the train signals instead.