Slightly simplifying loop break logic to match rack session's