Hi,
I suggested replacing your "Add to String Variable" with a "Set Variable". So the variable will only contain the current item domains on each loop.
In fact, each loop adds the domains of current item to the variable which kept those of the previous ones. During the second loop, it updates the "Test2" item, because the variable still contains "Test" domains where there is "Security", which makes the condition true.
You can also use the "Domains" dynamic content directly in the condition, the variable seems unnecessary.
______________________________________________________________
If I have answered your question, please Accept the post as solution.
If you like my response, please Thumbs Up.