Fix #1282970 [Editor crashes when changing <p> tag to <h1>](https://bugs.launchpad.net/calibre/+bug/1282970)