Should fix #1974 . Also see : https://stackoverflow.com/questions/62756712

If someone knows a way to write a unit test for this, please let me know. ;D

Cc-ing @kazuki43zoo