Revert "Merge pull request #116 from tdz/bug-1054934"

This reverts commit 2786ef57fec62bd125083fc974c141c4b23728e9, reversing
changes made to d259117b4976decbe2f76eeed85218bf0109190f.