How do I track down the errant script which is causing this annoying error?

That's not part of the script, it's just a button, that should be placed in the column header context menu, and it looks like you didn't.
Explained a few posts later actually.