=== modified file 'libcore/vm/ActionExec.cpp'
--- libcore/vm/ActionExec.cpp	2009-12-09 13:49:55 +0000
+++ libcore/vm/ActionExec.cpp	2009-12-14 21:24:42 +0000
@@ -35,6 +35,7 @@
 #include "as_environment.h"
 #include "debugger.h"
 #include "SystemClock.h"
+#include "GC.h"
 
 #include <sstream>
 #include <string>
@@ -326,6 +327,13 @@
             );
 #endif
 
+            
+            if ( next_pc <= pc )
+            {
+                // Collect on branch back
+                GC::get().collect();
+            }
+
             // Control flow actions will change the PC (next_pc)
             pc = next_pc;
 

=== modified file 'libcore/vm/VM.cpp'
--- libcore/vm/VM.cpp	2009-12-13 22:08:27 +0000
+++ libcore/vm/VM.cpp	2009-12-14 21:24:53 +0000
@@ -259,6 +259,7 @@
 
     if (_shLib.get()) _shLib->markReachableResources();
 
+#define ALLOW_GC_RUN_DURING_ACTIONS_EXECUTION
 #ifdef ALLOW_GC_RUN_DURING_ACTIONS_EXECUTION
     /// Mark all (including unreachable) stack elements
     for (SafeStack<as_value>::StackSize i=0, n=_stack.totalSize(); i<n; ++i)

