Revert "Merge pull request #1697 from zaphod42/issue/master/20967-mysterious-errors-caused-by-patch"

This reverts commit 1b27ae45c6866f9931ed6042a1c4db0a4c6aabd8, reversing
changes made to cb4881f8737ce1138057b2ec69e01a68ea7e2b65.

    Joshua Partlow: Wait, @finch, I think you just reverted something
    @AndrewParker and I are working on

Whoops.