Yeah, I do the same thing. I found it odd as well because I use dynamic SQL to traverse a database list regularly. It caught me by surprise so I thought I'd pass it back to you in case others may have run into the same thing.
It's not a big deal and easy to fix. Honestly I figured I'd torqued it up when I did the sp-to-script conversion... <grin>
Anyway, thanks for the script. I appreciate it and will definitely use it.