This collision happened precisely because of unfortunate circumstance that break in the rail and derailment happened just before the switch leading to the opposite track. Without the "help" of the switch, carriages of the first train likely wouldn't have invaded the second track.