Since it is not doing it on your first pass,your ultrasonics,and VT are probably OK. Your x23 input (trolley home) ,could be coming on. Have you had any other weird faults lately?
From what you are describing I would look at the x30,as you already have. A good test is to put it your VT board on position 3 ,and watch the pulse input on the VT ( #8 I believe). Put the machine like it is going down the drivers side ,put the x30 switch over a flag so it is on, then have someone drive the bridge up ,and down the rails,then light for the pulse input should stay on. If it blinks ,you have a festoon problem.
If it happens again pay attention to where the x30 switch is ,in relation to the counting flags , By this i mean is passed the first set of flags(drivers side) ,and into the second set ,of flags (passenger side), this can give an indication of what is going on.
One more question. Does this fault happen in bunches ,then go away ,is it just time to time?
I have also seen this happen when the trolley relay for the VT is not working ,check the wire connections,and make sure the relay is tightly plugged in.