Fixes to nesting stack for forthcoming test

Test document Sec004.docx triggered a nesting error in previous version that was to do with the section stack not reflecting instances where it had been messed up by re-nesting in the larger move function