Ambrose:

The planet does not wait. A male-to-female regeneration has already occurred on-screen, in the episode "Hell Bent", which was the last episode of Series 9. (Not only did the regeneration swap genders, it also turned an older bald white man into a younger black woman - alas, still folically-challenged.) We had already been set up before that with a casual mention of a gender-swapping Time Lord/Lady named Corsair, and the Master/Missy regeneration happened between stories.