It was seeded throughout the episode. It's not a deus ex machina.
That's how you're supposed to do deus ex machinas. Give it some kind of context to make it believable despite it being so sudden, unusually powerful.
Professor Zoom wrote:
All of the stuff with Clara, the advancement of their relationship, wiped out. The next few episodes could've been so much more potentially interesting with Clara mistrusting the Doctor, and perhaps having her OWN mystery to unravel... But, no. Blank cheerful Clara... again.
She's slowly becoming an uncharacter. She's cute and bubbly enough to keep fanboys interested and in their beds at night, but she's more of a MacGuffin than an actual flesh and blood character with depth, needs, goals, etc.
I don't think that's quite happening. It might not be as intense as without the reset, but she'll meet Vastra&co. next week... oh dear it's set before
The Snowmen isn't it? :/