We found the problem upstream! See [1] <#1>, especially Comments 5-7[2] <#2>, and the patch[3] <#3>.
1. https://bugs.gnucash.org/show_bug.cgi?id=798672 2. https://bugs.gnucash.org/show_bug.cgi?id=798672#c5 3. https://github.com/Gnucash/gnucash/commit/98251d59a6e6940efae2001a1e619c08828c8738