prevent data loss while promoting from second replica to owner.

Fixes #2785
I did not understand what you did here? Are you using `stop` latch as an atomic flag?