Fix two possible bugs.

Delete only checked for a matching name. Clean it up and use the same
method as update. Update didn't check for a possible deleted row. I
suspect we can't actually hit that state, but rather safe than sorry.