Use struct to enforce relative location of local variables in the stack frame.

Otherwise GCC is free to reorder them, and negative indexing of ubuf[] can clobber data.
Merge branch 'fixes'