With QGIS server the scaleFactor is sometimes at 0.

Than we enter in a loop. For example on a GetLegendGraphic with a
line style as Steps