[VOL-4065] Fix race condition between mastership and local leadership

Change-Id: I62251bfa97074c886af4e325993f87916749d624
2 files changed