Remove the black-hole script tag in a more robust way

Was seeing reports of the querySelector() call returning null.