You cannot use SetRace (by console or script) to turn an actor with custom race into another custom race. If you try, it fails to render. The actor is still there (collision is on, etc.) but is invisible (and sounds sometimes cut out). If you use the SetRace command again, you can change the actor back into the original custom race, and the actor will reappear.
I discovered this bug while trying to do a mod using the Creation Kit (I'm a rank beginner) that allows one to put on and take off an animal companion's armor (modeled on Dawnguard's huskies). The easiest way I identified to do that was to have two separate races (armored and bare) and use the SetRace command (with armor noise sound effects and with the armored version having a resist damage perk/spell) to give the appearance of putting on and taking off armor. But I can't get it to work. The "non-default" form fails to render. The is regardless of which race I set as the default--the default race always renders (so I didn't mess up the meshes or textures).
With my little (failed) mod, I have also confirmed that the script works, and that both races render fine when not being used to swap (or are being used to swap with a race that is present in the original skyrim.esm). It's just that I can't swap one custom race for the other with SetRace. I even tried to turn my mod into an esm to see if that would fix the bug -- it did not.
Anybody experience this? Is it just another form of the headless bug? Any insight would be appreciated (including any alternate way to do my mod and avoiding the bug). Many thanks.