Have a leaving condition dependent on contents of station inventory.
Reading the train shortcircuits this-the same amount of items is always shown whatever happens, because both the train inventory and the station inventory are being read at the same time.