Try to report source of bad Lua API calls
Merge pull request #1124 from ioddly/fix-issue-1121

Try to report source of bad Lua API calls