This introduces a regression, see #265. Reverting until a better solution can be found. This reverts commit 5dae7aac.