Fix crash after calling `EditorUndoRedoManager.clear_history()` and then interacting with history dock entries