Fix stange bug in SyntaxError handling

Looks like that case was not covered by tests at all!