Merge pull request #409 from abarth/stack_repaint

Stacked does not repaint when its position changes
diff --git a/packages/flutter/lib/widgets/widget.dart b/packages/flutter/lib/widgets/widget.dart
index 60efa0a..dcab05d 100644
--- a/packages/flutter/lib/widgets/widget.dart
+++ b/packages/flutter/lib/widgets/widget.dart
@@ -887,8 +887,8 @@
     if (parentData != null) {
       assert(root.parentData != null);
       root.parentData.merge(parentData); // this will throw if the types aren't appropriate
-      if (parent.root != null)
-        parent.root.markNeedsLayout();
+      if (ancestor != null && ancestor.root != null)
+        ancestor.root.markNeedsLayout();
     }
   }