The change to avoid duplicate tasks in a queue had an error where
it would cause all tasks to be immediately marked as completed.
This caused the synchronous task waits on actions such as immediate
sync of a single change to return early, before actual completion.
This may have caused other errors as well.
Change-Id: Ie000a1242db17b1bed8c2eac919e242225f5bba6