Always define the name attribute to a default value.

This fix an error in error handling code. This will allow the real error to show up.
Merge pull request #1160 from nouiz/fix_init

Always define the name attribute to a default value.