Fixes to masterPosWait() for master switchovers