codegen wibble
yet another def-use fix
redo codegen for loops (def-use fix)
can't generate code for open functions
warnings