Always use get<ExtruderTrain&>(...).extruder_nr instead of get<size_t>(...)
This way you have a single source of truth: The pre-processed extruder number in the ExtruderTrain field. This extruder number will never cause a segfault if the front-end passes an extruder number that is too high, but gives a proper error instead then. (It'll still give a segfault if the implementation creates an array that is too short though.)
Contributes to issue CURA-4410.