++ On this node. The talk through of the troubleshooting and the explanation of your conclusions is most helpful. I've found that learning to effectively troubleshoot code in a logical manner has vastly improved my skills as a programmer. So, I'm sorry that you had to spend time working this through (I know that routine--we've all been-there-done-that with broken code), but I'm glad you wrote it up and posted it here. Maybe there's some benefit--if people share their 'mistakes', we can all learn a little from it.
in reply to Never lock $0 inside of a BEGIN block