Hello Thank you!
I am clearly not a good reviewer for such changes... But for a note: I read the v4 patch and have no useful comments. Good new tests, reasonable code changes to fix multiple bug reports. The patch is proposed only for the master branch, right? regards, Sergei