You don't even need to look back that far. One of the best examples in recent history is 'Blink'.
1) Doctor receives a script of questions and answers
2) Doctor gets trapped back in time
3) Doctor creates 'Easter Eggs' with his portion of the script
4) Sparrow asks the questions on the script, based off the answers the Doctor has recorded.
5) Sparrow provides Doctor with Script
If the Doctor doesn't have the script before he gets trapped, he can't get back - yet the script can't be made unless it already existed TO be made.
Timey-Wimey, Wibbly-Wobbly of course. And that's all you have here as well. A -> B -> C -> A.
That said, this was my least liked episode of the new run. From a story standpoint, and a writing/acting standpoint, it was fine. But the direction killed me. The scenes were choppy, the overuse of a single corridor under different lighting (albeit a DW staple as well) felt like a missed opportunity, and I never felt any real suspense building during the heist itself.
The first few minutes of the episode detailed this bank, the safest in the known universe, unbreakable, highest possible security, etc. etc. - But when it came to breaking in, they didn't need to bypass the atomically locked seals, or deal with regulated air supply. They needed to climb down some back shaft ladders, unscrew a few vents, and crawl down to the vault. There was no REAL sense of the place being all that secure.
I dunno. I guess I was hoping for a direction style and story layout more like Ocean's 11/12/13. It's still a far cry better than almost anything in the Smith era though, so I can't really complain (no hate towards Smith, but I'm so glad to have moved Doctor Who back away from being a storybook fantasy - and you know how Capaldi's Doctor felt about Robin Hood's laughter? That's how I felt about Smith's Doctor almost every episode...)