[html] + <img>, −<script>

<script> was being inserted into <head> by DOMDocument on load, checking <head> too.