Revert "Closes #1133"

This reverts commit 9ba6e0ae4f9f5a7b920eae6be3b21cddcf406056.
Hopefully a better fix for #1133
Merge branch '4.0' into 4.1
Merge branch '4.1'