So, the wiki helped, since I am using Steam but it wasn't as fully detailed as it could have been. Your coding worked, but I had to do the following to make the manual patch happen. I am providing this in case someone else would like to do this too.
Go to C:\Program Files\Factorio -> mods -> right-click on factory-inspector_1.1.19 and "extract all" - > open the extracted factory-inspector_1.1.19 folder -> open the folder within that is factory-inspector_1.1.19 -> open script folder -> open event-handlers document -> replace lines 6-9 with the new coding you provided above and then save the document.
Afterwards, go back to C:\Program Files\Factorio -> mods -> right-click on the uncompressed Factorio-inspector_1.1.19 and either "compress to ZIP file" or "send to" "compressed folder" and save over the original compressed folder (or you can move that folder somewhere else outside of the main Factorio folder) that has the same name as the original folder. When starting the game, it will offer you to "sync and load" the game. Go ahead and choose that option. It will not overwrite the patch that you made since Factorio realizes the compressed folder with the same name is still there. Then voila, everything works and you can play and drop the Terraformer without experiencing the same error.
Thank you so much for the coding for the patch and the link to the wiki page.