I have pushed an alternative fix for the issue your unit test captures to the development branch. This one gets it at the root of the issue.
Try giving it a spin and see if it solves your problem - I'll cherry-pick the fix into master soon.
Thank you for an otherwise excellent PR! Your help is much appreciated ;-)
p.s.: If you're curious, the actual fix happens here.
I have pushed an alternative fix for the issue your unit test captures to the development branch. This one gets it at the root of the issue. Try giving it a spin and see if it solves your problem - I'll cherry-pick the fix into master soon.
Thank you for an otherwise excellent PR! Your help is much appreciated ;-)
p.s.: If you're curious, the actual fix happens here.