The Doctor said in that episode, though, that the memory whammy would only last a few hours. So either the real Osgood died, or a Zygon Osgood decided to (for some reason) let themselves get killed rather than shapeshift to fight the Master. Which means this 'new' Osgood is either the original (which means a Zygon died for 'reasons'), or a Zygon just pretending (which I'm not sure works, since previously we've seen that the Zygons keep their originals alive so they can maintain the copy).
I'm guessing that was supposed to be part of what made her different from other companions. She didn't just jump into the TARDIS and fly away with the Doctor when he crooked his finger at her; she made him "come back tomorrow and ask me again", and she always had the Doctor proving that he wanted to travel with her, and that she was not "a bargain basement stand-in for someone else" (when he was still figuring out the whole 'impossible girl' thing and thinking she was the most recent incarnation rather than being the original). Also, with Rory and Amy he'd learned that companions do need to live some of their own lives (recall that he left them behind more than once), so I suppose not having her on-board 24/7 like Doctors 1-10 made some amount of sense to him.