Well… I mean technically there should only ever be one SP that is called a particular name(even though unfortunately you can have the same name on the Revit side with project and shared parameters), but if it found the name in one of the groups in the array it would add it. I changed your code from a string to an array and it seems to be working fine, but it will probably create unintended problems.
Won’t it try to go through each of these groups trying to add the parameter? If it doesn’t find it, nothing happens, but if it does it will add it to the Text group?