Revert "Merge pull request #12985 from arcturus/bug-929043"

This reverts commit e3323f920a0a40f5efb386e4a3e48ba8c7de3a81, reversing
changes made to 163f47b8ca0c6f9cead75347793d8fc39bfefa59.