I've been adding the "Affects ReligionStarter 1 100" just about anywhere I can think of in the adoption, marriage and coming of age triggers but none of my characters seem to be getting it. As the trait only has threshold 1, this should give them the secret trait however.

Using give_trait during the game allows adding it though, so I wonder whether it is ignored when called for in the scripts? Or do I have to set the amount to higher than 1 in the scripts?