More of the simplest thing that could possibly work: 1: visit patches stc_parent, stc_cx_node and stc_cx_obj fields into *all* nodes.  Simplified code using simplified  new_context, define_name and reference_name methods.