Hello! I want to use liquid code to show a dynamic text block when an order has specific product in it. When the order contains On Demand products (at least one) I want to show the block (only once). The On Demand poperty is visible in the JSON code in Klaviyo, but I cant seem to use the right liquid code to show the dynamic text block. I constantly see ‘message displayed without tags or variables’ when I try to preview the mail (see image below)

The liquid code I am using
{% assign has_on_demand = false %}
{% for item in event.extra.line_items %}
{% if item.properties %}
{% for prop in item.properties %}
{% if prop.value == 'On Demand Product' %}
{% assign has_on_demand = true %}
{% break %}
{% endif %}
{% endfor %}
{% endif %}
{% if has_on_demand %}
{% break %}
{% endif %}
{% endfor %}
{% if has_on_demand %}
<p>Your order contains On Demand Products.</p>
{% endif %}
Part of the json where the property is filled
"properties": [
{
"value": "On Demand Product",
"name": "Type"
}
If I am looking at the pretty code I see the property is in Item → Extra → Line_items → 0: (or 1: or 2: if there ar more products) → properties: → 0: → value: On Demand Product
I really hope someone can help me out as I am trying to understand what I am doing wrong and how I can fix this. In the near future I also want to show those specific On Demand products in a different follow up mail (so only those items).
Kind regards, Trevor