Revert "Merge pull request #12234 from EragonJ/bug-914317"

This reverts commit bda5c4a902793934467b689a118a2c68f745706e, reversing
changes made to bc85e07011c2c40986693657fa7647ee5c9f8eea.