Introduce a new function for the case of dropping a master because we synced - remove a deadlock.
Merge bug26125
stable to default