Improved debug output when trying to write an invalid value to an attrib...

...ute in lua.