> Please consider the following fix to the problem, patching function
> cancel-change-group.

Thanks.

If this problem could be solved locally in the atomic groups code, I'd
prefer that.

The patch is local to the atomic groups code: it only changes
the function cancel-change-group, whose purpose is to abort an atomic group.

  If not, then let's postpone changes in the low-level
undo machinery

There is no intention to change there anything.

 I'd like to
avoid adding more changes in such deep innards.

That is perfectly understandable.