539091: Infinite loop when calls to excludesAll operation

Change-Id: I2d5008d665c44554e72efe49fc4687bbab367fd2
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=539091
Signed-off-by: Dennis Wagelaar <dwagelaar@gmail.com>
diff --git a/plugins/org.eclipse.m2m.atl.engine.emfvm/src/org/eclipse/m2m/atl/engine/emfvm/lib/ExecEnv.java b/plugins/org.eclipse.m2m.atl.engine.emfvm/src/org/eclipse/m2m/atl/engine/emfvm/lib/ExecEnv.java
index 239b32a..72229cc 100644
--- a/plugins/org.eclipse.m2m.atl.engine.emfvm/src/org/eclipse/m2m/atl/engine/emfvm/lib/ExecEnv.java
+++ b/plugins/org.eclipse.m2m.atl.engine.emfvm/src/org/eclipse/m2m/atl/engine/emfvm/lib/ExecEnv.java
@@ -1245,7 +1245,8 @@
 						boolean ret = true;
 						Collection<?> s = (Collection<?>)localVars[0];
 						for (Iterator<?> i = ((Collection<?>)localVars[1]).iterator(); i.hasNext();) {
-							ret = ret && !s.contains(i.next());
+							Object next = i.next();
+							ret = ret && !s.contains(next);
 						}
 						return Boolean.valueOf(ret);
 					}