Fix issues with syntax errors breaking lexer results (fixes #29)