Why does society generally view pedophilia as morally wrong nowadays, while simultaneously believing that transsexualism for children is acceptable? Isn't this a contradiction?

Surely if children were considered incapable of consenting to sexual activities, they should be considered incapable of consenting to life-changing medical procedures?