That patch is wrong. If addseverity is used to remove or change an entry (the only possible reason to add this lock) then the string can be removed as well. In this case it's not sufficient to just lock around the search. I checked in a patch fixing that problem.