I did exactly the same thing trying to apply the patch as you described but I gave it another go anyway and still got the same error message.
Then I tried doing the editing from the patch lines as Bulletproof Outlaws suggested and, after realising textedit on Mac doesn't work very well with code lines that long, I downloaded and did the cut/paste with Atom instead. Now I am up and running again finally.
Much appreciated to both of you for trying to help me out here. I don't have much hair left to pull out :-)