Thought this made the last push but apprantly not.
diff --git a/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.gen/src/metaabm/tmpl/infer.ext b/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.gen/src/metaabm/tmpl/infer.ext
index bd68317..f676cc6 100644
--- a/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.gen/src/metaabm/tmpl/infer.ext
+++ b/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.gen/src/metaabm/tmpl/infer.ext
@@ -23,6 +23,12 @@
 cached Boolean isHost(SGrid proj) :
 	true;
 
+cached SContext rootContext(SContext agent) :
+	agent.owner != null ? agent.owner.rootContext() : agent;
+
+cached SContext rootContext(SAgent agent) :
+	agent.owner.rootContext();
+
 cached Boolean isHost(SAgent agent) :
 	!hosts(agent).isEmpty;