Fixed #5012 (Hang when there is syntax error 'else }')