New version of v8 from bleeding edge at revision 3649
diff --git a/src/contexts.cc b/src/contexts.cc
index ead73ee..19920d2 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -52,11 +52,14 @@
   if (global()->IsGlobalObject()) {
     return global()->global_context();
   }
+
   // During bootstrapping, the global object might not be set and we
   // have to search the context chain to find the global context.
+  ASSERT(Bootstrapper::IsActive());
   Context* current = this;
   while (!current->IsGlobalContext()) {
-    current = Context::cast(JSFunction::cast(current->closure())->context());
+    JSFunction* closure = JSFunction::cast(current->closure());
+    current = Context::cast(closure->context());
   }
   return current;
 }