It does not need solving, but the "scanForNonThargoid" just works different than one would expect.A small difficulty with scanForThargoid/scanForNonThargoid leads to thargoid-on-thargid agression, hopefully this can be resolved soon. For now I am using multiple copies of the thargoid warship, instead of thargoid(%) to affect frequencies of appearance.
I looked into the sourcecode and saw that it scans all ships within scanner range and filters out those with "SCANCLASS_CARGO", those that are docked and those of with the role starts with "tharg".
And that last is important, it does not look at the "SCANCLASS_THARGOID". Why Giles did it this way is only guessing. Maybe he introduces the scannclass_thargoid after he wrote this part of the program. Or maybe he wanted to introduce the possibility that normal ships could take sides of the thargoids and thargoid ships take the side of the humans. With this mechanisms you could create a normal ship that is not attacked by thargoids as long as the role starts with "tharg".
In the case of "Thorgorn_Treat" most roles start with "tharg" but not all as the name "Thorgon" already suggests.
Also the command "scanForThargoid" doen not look for scannclass but looks only at the role "thargoid". This is more selective than just looking at the prefix "tharg" and will omit more ships in "Thorgorn_Treat " and also the thargoid_carrier.
I already updated the eliteWiki AI-page about these commands.