Fixed occaisional crash with switching between editors

We were only deregistering the observer if the editor type was the source code
editor. I moved the unregister logic to the superclass hook.