Fixed bogus trailing comma warnings in table constructors

Fixed a logic bug introduced by previous commit c4a263844, triggering
the trailing comma warning if a table initializer ended with a named
function.