Merge "Fixes to masterPosWait() for master switchovers"