Because the page stack is a vector, if during PushPage, a new page is pushed, the vector may re-allocate. This 'pulls the rug out' from underneath the initial stack (I mean the code stack), which then crashes.
To fix this, use a deque, since push/pop won't invalidate references.
Reported by: Imarok.
Based on a patch by: Imarok (tests are his)