This reverts commit 370ee919. Issue #509 has all the details but it was confirmed that the crash was not due to this, so the previous commit was wrong.