Macro expansion re-written to take care of non-free vars.