Y=0 is your words. Your first column (indexed at 0) is all of the words. Your flag is in the second column (indexed at 1).
For consistency/clarity, change your original code from Set value X to Set value XY. The expression would now be:
X=wordCount
Y=0
Value=trim(tokenat(Anagrams,wordCount,","))
That will make it more obvious that the words are ending up in column (Y) =0.