This reverts commit 582635b031. The segfault issue has disappeared, so the workaround is not needed anymore.
582635b031