Some fixes for Lua interpreter crashes
Merge pull request #1340 from qreal/parser-fixes

Some fixes for Lua interpreter crashes