Revert "Merge pull request #982 from andymckay/848868"

This reverts commit 7e73feefc6d0bc58525a3daa05a42a87437550ca, reversing
changes made to 3e949326daa07b0c4873f185e79da2072ab08de8.