It seems to me that there is an important difference between ‘flipping the switch’ and ‘flipping the switch back’, which is the intent of the action.
In the first scenario, your intent is to sacrifice one person to safe many.
In the second scenario, your intent is to undo a previous wrong.
Thus a deontologist may perfectly consistently argue that the first action is wrong (because you are never allowed to treat people only as means, or whatever deontological rule you want to invoke), while the second action is allowed.
It seems to me that there is an important difference between ‘flipping the switch’ and ‘flipping the switch back’, which is the intent of the action.
In the first scenario, your intent is to sacrifice one person to safe many.
In the second scenario, your intent is to undo a previous wrong.
Thus a deontologist may perfectly consistently argue that the first action is wrong (because you are never allowed to treat people only as means, or whatever deontological rule you want to invoke), while the second action is allowed.