The trait's description includes the name/link to their real father though, so you can still tell them apart. If you switch player characters without your former character dying, and then he has a bastard, that child may get the attribute.
The trait is added automatically on birth. I've made it congenital so that it shows up in various marriage dialogs. Note: The trait says that it is congenital, but the inheritance chance is zero, so in effect it shouldn't be inheritable. It should not conflict with any other mods and does not override any of the base game files. Gives your secret bastards a searchable trait that indicates your character is their real father.