Strange error with nested Enum.reduce_while

Ah, yes. You got my blindspot! I didn’t think in this direction. I though this error is triggered when first entry, which led me to an wrong end. Thank you for saving my day!