The parser-inserted flag is unset in step 2 and reset in step 8 in prepare a script. If the algorithm quits in between these two steps, the flag stays unset.
While this is intentional as noted in the algorithm to allow other scripts to mutate them and correct them, for the purposes of the CSP 'strict-dynamic check' (step 4) this is actually incorrect as it opens invalid scripts to be blessed by strict-dynamic.