By itself this change doesn't look great since it's mixing up the responsibilities of different functions. However, it's preferred since we want to separate geometry undo state and per-node undo state further in the future. Eventually geometry undo state should be stored in `StepData` instead.