We were computing the value of the flag every time we were reacquiring the locks (i.e. after a yield). However this is not really needed because:
- If the node was a primary and stepped down, the ongoing operation will be aborted.
- It is not possible for a secondary to step up without completing first the oplog catch-up.