Cleanup local variables in Editor::markAndReplaceFor