Improved fix for #2189704 (sync loss)

* The prior fix prevented looping in the case that a new sync key wasn't
* Unfortunately, the prior fix tested for the looping condition (moreAvailable)
  before it would have been set.
* The correct fix is to detect the looping condition after both the sync key
  and the moreAvailable flag are guaranteed to have been set

Change-Id: I2eee4ddc123fb2a5ce4ef3bd4e7d0614fcfbdf36
1 file changed