Reset the part after a type refactoring

This stops an error where spell checking stops after a type renaming until
another part is activated. This is because the resource changes but
the editor tracker is not updated, so we have to update it manually.