If I remember correctly, after boarding the phantom train Cyan suddenly realises what it is. Therefore it existed all along and wasn't the railway that was destroyed in the fighting.