# HG changeset patch
# User Sylvain Thenault <sylvain.thenault@logilab.fr>
# Date 1223487022 -7200
#      Wed Oct 08 19:30:22 2008 +0200
# Node ID 5675a55e32ea9b7c328a52dd537386b9add81c52
# Parent  34c8e9feb357f80774590665e5059cc5f411d2e8
set parent

diff --git a/stmts.py b/stmts.py
--- a/stmts.py
+++ b/stmts.py
@@ -775,6 +775,7 @@
         for term in self.selection:
             for vref in term.iget_nodes(nodes.VariableRef):
                 if not vref in selection:
+                    vref.parent = self
                     selection.append(vref)
         self.selection = selection