Optimize MarkUnmatchedStepsAsPending