Fix control flow in syntax checking.