diff -puNr clutter-1.8.0.orig/clutter/clutter-box-layout.c clutter-1.8.0/clutter/clutter-box-layout.c
--- clutter-1.8.0.orig/clutter/clutter-box-layout.c	2011-09-15 18:35:20.000000000 +0900
+++ clutter-1.8.0/clutter/clutter-box-layout.c	2011-10-05 21:47:21.086561845 +0900
@@ -749,12 +749,12 @@ count_expand_children (ClutterLayoutMana
                        gint                 *visible_children,
                        gint                 *expand_children)
 {
-  GList        *children;
+  GList        *n_children, *children;
   ClutterActor *child;
 
   *visible_children = *expand_children = 0;
 
-  for (children = clutter_container_get_children (container);
+  for (n_children = children = clutter_container_get_children (container);
        children;
        children = children->next)
     {
@@ -774,7 +774,7 @@ count_expand_children (ClutterLayoutMana
             *expand_children += 1;
         }
     }
-  g_list_free (children);
+  g_list_free (n_children);
 }
 
 struct _ClutterRequestedSize
@@ -901,7 +901,7 @@ clutter_box_layout_allocate (ClutterLayo
 {
   ClutterBoxLayoutPrivate *priv = CLUTTER_BOX_LAYOUT (layout)->priv;
   ClutterActor *child;
-  GList *children;
+  GList *n_children, *children;
   gint nvis_children;
   gint nexpand_children;
   gboolean is_rtl;
@@ -929,7 +929,8 @@ clutter_box_layout_allocate (ClutterLayo
     size = box->x2 - box->x1 - (nvis_children - 1) * priv->spacing;
 
   /* Retrieve desired size for visible children. */
-  for (i = 0, children = clutter_container_get_children (container);
+  n_children = children = clutter_container_get_children (container);
+  for (i = 0;
        children;
        children = children->next)
     {
@@ -974,7 +975,7 @@ clutter_box_layout_allocate (ClutterLayo
 
       i++;
     }
-  g_list_free (children);
+  g_list_free (n_children);
 
   if (priv->is_homogeneous)
     {
@@ -1036,7 +1037,7 @@ clutter_box_layout_allocate (ClutterLayo
         x = 0.0 + box->x2 - box->x1;
     }
 
-  children = clutter_container_get_children (container);
+  n_children = children = clutter_container_get_children (container);
   for (i = g_list_length (children) - 1, children = g_list_last (children);
        children;
        children = children->prev, i--)
@@ -1148,7 +1149,7 @@ clutter_box_layout_allocate (ClutterLayo
                             &child_allocation,
                             flags);
     }
-  g_list_free (children);
+  g_list_free (n_children);
 }
 
 static ClutterAlpha *
