Ah, good point. This can be quickly verified and handled with a little bit of testing.
Add a custom specialization to a character. Assign it to the Medicine skill. Now right-click on it within the character and select the "Show Debug Tags for ???" option. Scan through the list and you won't see the "Skill.sMedicine" tag. However, you *will* see a "CustomSpec.sMedicine" tag.
So the tag check needs to determine if *either* tag is present. This is achieved by modifying the "validif" statement within the script above. It should look like below.
Code:
validif (eachpick.tagis[Skill.sMedicine] + eachpick.tagis[CustomSpec.sMedicine] > 0)