From Lua 5.2: debug.getinfo(..., "u") returns nparams and isvararg.