Evaluator Groups - markupcode drops headings

Hi!

Just tried the newest feature in latest beta and added some markup code in return collection.

Let me first show the current result in a lister without markup code. The result has got a certain order, specified in the value collection.

After returning the collection with the new variable markup, the result looks promising, however, some groups are missing.

What has hanged in my coding?

I've inserted lines (1), (2) and (3) and commented line(4).
IMO, not a huge modification and it works partly, but not fully as it did before.

Do you spot the issue here?

Found my mistake!

Line (2) was at the wrong position and was not executed - only in a special case.
I've inserted (1) in the last else clause instead at the very end of the complete if clause.