Fix job duplication bug

Lookup of an existing obsoleted job was not done within the same
lock lifetime as scheduling its replacement, which means that callers
could race scheduling "the same" job and wind up creating duplicates.

Bug 27589164

Change-Id: I572b01092964b82316961de601bb7f1afedf18de
1 file changed