Actually, that was the problem - AddImage returns an object, and you weren't assigning it to anything, so it was being "evaluated", like if you just put this in your script:

break on

2+2

exit 1

2+2 gets evaluated because its not assigned, and piped to the console. Likewisem, your Image object was being evaluated. This was identified to Ruud quite some time ago - thought he "fixed" that - guess not.

-Shawn