Improved debug output when trying to write an invalid value to an attribute in lua.