Fixing bug with capturing that broke due to outerHTML always providing a balanced tree/DOM