Add debug macro
Fix flattener multiple-var lambda loop bug