This isn't exactly a bug. Life magic traits require Kingdom-allegiance, while Death magic traits require Empire-allegiance. So, if you are a Kingdom-faction and get a hero with Death Apprentice, you won't be able to improve it, because you don't fulfill the necessary requirement.
The trait section should probably tell you this, but that is more of an UI issue than a bug.