Avoided listener callbacks during TextEditor destructor.
Avoided an assertion when testing plugin types.