#737: Infinite loop in LinearScaleTickLabels

This ensures that the loop exits.