When a long train rides over a track switch, its tail may get teleported to
the other track. When there is an activated detector rail before the
switch, it remains activated after the tail teleports. After that, the
detector rail remains activated even if it is destroyed and placed again.
It goes deactivated after a train rides on it and then rides off again.