Previous hasError status (after syntax error) was not reset. As a result, we did not report the next error on the surrounding element.
(cherry picked from commit 60c0be1cc6ca4967eb72e2fc24278cdc5cf2728e)
Review ID: IJ-CR-157915
GitOrigin-RevId: a44595d7b2e8fd472f6f084998901645bf29eab6