You're totally right... that's a bug. There's no need for that variable at all. The element can be referenced as "element". I'll add a JIRA for this in Smooks.
I created the JIRA here MILYN-252.
If you need this fix in a hurry, you can easily fix and patch locally. Checkout the v1.1.1 tag from http://svn.codehaus.org/milyn/tags/Smooks_V1.1.1/, go into the scripting cartridge and edit the .ftl template used to generate this code (ScriptedGroovy.ftl). Just remove this variable. Build the scripting cartridge and patch your local ESB.
Sorry for the inconvenience.