Avoid parser crash for deeply nested classes without closing braces, improve error recovery for classes without an opening brace. Reviewed-by: vromero
Reviewed-by: darcy, ihse