* Simplify and clarify logic in `BKE_undosys_step_undo/redo_with_data_ex`, by adding early return on invalid situations, renaming some variables, and adding comments. * Add more sanity checks in those functions. No behavioral change are expected here, besides in potential edge-case, invalid situations. This is a preliminary change, before some deeper modifications of `BKE_undosys` undo/redo API. Differential Revision: https://developer.blender.org/D10033