Trait heritability in major transitions