For a flow with four steps, this method will be called four times, with `$stepNumber` 1..4, while the current step number stays the same. `$stepNumber !== $flow->getCurrentStepNumber()` just avoids linking to the current step.

It should work, but could you test it with your use case?