Fix updating mutation observer handlers after opening new doc.