This reverts commit 2b4defb2a9 and implements a fix "at the source" instead. Should fix #2099.
2b4defb2a9