fix livelock happens when merging node restarted during the process.
Merge pull request #4157 from eminn/fix/livelock-during-split-brain-maintenance

[backport] fix livelock happens when merging node restarted during the process.