During development of PR #1376 I run into this issue and fixed it in #1376. I think this issue is independent of #1376. I revert the fix in #1376 and create a new pull request with the fix.