> However, the size and complexity of the patch stems from the fact that it tries to deal with several possible scenarios at once:

All right. `MergeArgs` was what got me suspicious. But I haven't looked closely yet.

> I don't mind closing this one in favour of yours and later submitting incremental fixes. What do you think?

You could do it here, just rebase the pull and split the changes into separate commits.