avoid possible KeyError in _removeAllButLastWorkflowHistory().