Fixed stmt block to build up stack of seqs.  While loop is confirmed to work on our test case.