fix: sanity checks throwing an error if scripts are set in the head (#12068)
fix: sanity checks throwing an error if scripts are set in the head (#12068)

Fixes the sanity checks throwing an error if they run too early and they're inserted before the `body`.

Fixes #12026.
DevVersion/material2,jelbourn/material2,jelbourn/material2,amcdnl/material2,josephperrott/material2,angular/components,Jefiozie/material2,crisbeto/material2,josephperrott/material2,mmalerba/material2,josephperrott/material2,mmalerba/material2,angular/components,amcdnl/material2,DevVersion/material2,josephperrott/material2,crisbeto/material2,andrewseguin/material2,mmalerba/material2,DevVersion/material2,amcdnl/material2,jelbourn/material2,DevVersion/material2,andrewseguin/material2,Jefiozie/material2,amcdnl/material2,crisbeto/material2,mmalerba/material2,angular/components,Jefiozie/material2,andrewseguin/material2,andrewseguin/material2,Jefiozie/material2,josephperrott/material2,amcdnl/material2,angular/components,andrewseguin/material2,Jefiozie/material2,crisbeto/material2,mmalerba/material2,jelbourn/material2,DevVersion/material2,jelbourn/material2