diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BasePackage.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BasePackage.java
index d3431b187ae9a8d9d5d453ed2c25b5ef6665471f..afff27bf0ac2437f163e765bab9f5235c6c60c75 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BasePackage.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BasePackage.java
@@ -207,7 +207,7 @@ public class BasePackage extends RBuiltinPackage {
         add(BrowserFunctions.BrowserSetDebug.class, BrowserFunctionsFactory.BrowserSetDebugNodeGen::create);
         add(BrowserFunctions.BrowserText.class, BrowserFunctionsFactory.BrowserTextNodeGen::create);
         add(Call.class, CallNodeGen::create);
-        add(CapabilitiesFunctions.Capabilities.class, CapabilitiesFunctionsFactory.CapabilitiesNodeGen::create);
+        add(Capabilities.class, CapabilitiesNodeGen::create);
         add(Cat.class, CatNodeGen::create);
         add(Ceiling.class, CeilingNodeGen::create);
         add(CharMatch.class, CharMatchNodeGen::create);
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Capabilities.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Capabilities.java
new file mode 100644
index 0000000000000000000000000000000000000000..ed3a304e2219e548468f707c80b0825736f427d2
--- /dev/null
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Capabilities.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.oracle.truffle.r.nodes.builtin.base;
+
+import static com.oracle.truffle.r.runtime.builtins.RBehavior.READS_STATE;
+import static com.oracle.truffle.r.runtime.builtins.RBuiltinKind.INTERNAL;
+
+import com.oracle.truffle.api.dsl.Specialization;
+import com.oracle.truffle.r.nodes.builtin.RBuiltinNode;
+import com.oracle.truffle.r.runtime.RRuntime;
+import com.oracle.truffle.r.runtime.builtins.RBuiltin;
+import com.oracle.truffle.r.runtime.context.RContext;
+import com.oracle.truffle.r.runtime.data.RDataFactory;
+import com.oracle.truffle.r.runtime.data.RLogicalVector;
+import com.oracle.truffle.r.runtime.data.RStringVector;
+
+@RBuiltin(name = "capabilities", kind = INTERNAL, parameterNames = {}, behavior = READS_STATE)
+public abstract class Capabilities extends RBuiltinNode {
+    private enum Capability {
+        jpeg(false, null),
+        png(false, null),
+        tiff(false, null),
+        tcltk(false, null),
+        X11(false, null),
+        aqua(false, null),
+        http_fttp(true, "http/ftp"),
+        sockets(true, null),
+        libxml(false, null),
+        fifo(false, null),
+        cledit(false, null),
+        iconv(false, null),
+        nls(false, "NLS"),
+        profmem(false, null),
+        cairo(false, null);
+
+        private final boolean defValue;
+        private final String rName;
+
+        Capability(boolean defValue, String nameOverride) {
+            this.defValue = defValue;
+            this.rName = nameOverride == null ? name() : nameOverride;
+        }
+
+        static String[] rNames() {
+            Capability[] values = values();
+            String[] result = new String[values.length];
+            for (Capability c : values) {
+                result[c.ordinal()] = c.rName;
+            }
+            return result;
+        }
+
+    }
+
+    private static final RStringVector NAMES = RDataFactory.createStringVector(Capability.rNames(), RDataFactory.COMPLETE_VECTOR);
+
+    @Specialization
+    protected RLogicalVector capabilities() {
+        byte[] data = new byte[NAMES.getLength()];
+        for (Capability c : Capability.values()) {
+            boolean value = c.defValue;
+            switch (c) {
+                case cledit:
+                    value = RContext.getInstance().isInteractive() && !RContext.getInstance().getStartParams().getNoReadline();
+                    break;
+            }
+            data[c.ordinal()] = RRuntime.asLogical(value);
+        }
+        return RDataFactory.createLogicalVector(data, RDataFactory.COMPLETE_VECTOR, NAMES);
+    }
+}
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CapabilitiesFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CapabilitiesFunctions.java
deleted file mode 100644
index 32cd5b8d6140411a6b000c9773b08c697218489d..0000000000000000000000000000000000000000
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CapabilitiesFunctions.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.truffle.r.nodes.builtin.base;
-
-import static com.oracle.truffle.r.runtime.builtins.RBehavior.READS_STATE;
-import static com.oracle.truffle.r.runtime.builtins.RBuiltinKind.INTERNAL;
-
-import com.oracle.truffle.api.dsl.Specialization;
-import com.oracle.truffle.r.nodes.builtin.RBuiltinNode;
-import com.oracle.truffle.r.runtime.RRuntime;
-import com.oracle.truffle.r.runtime.builtins.RBuiltin;
-import com.oracle.truffle.r.runtime.context.RContext;
-import com.oracle.truffle.r.runtime.data.RDataFactory;
-import com.oracle.truffle.r.runtime.data.RLogicalVector;
-import com.oracle.truffle.r.runtime.data.RStringVector;
-
-public class CapabilitiesFunctions {
-
-    @RBuiltin(name = "capabilities", kind = INTERNAL, parameterNames = {}, behavior = READS_STATE)
-    public abstract static class Capabilities extends RBuiltinNode {
-        private enum Capability {
-            jpeg(false, null),
-            png(false, null),
-            tiff(false, null),
-            tcltk(false, null),
-            X11(false, null),
-            aqua(false, null),
-            http_fttp(true, "http/ftp"),
-            sockets(true, null),
-            libxml(false, null),
-            fifo(false, null),
-            cledit(false, null),
-            iconv(false, null),
-            nls(false, "NLS"),
-            profmem(false, null),
-            cairo(false, null);
-
-            private final boolean defValue;
-            private final String rName;
-
-            Capability(boolean defValue, String nameOverride) {
-                this.defValue = defValue;
-                this.rName = nameOverride == null ? name() : nameOverride;
-            }
-
-            static String[] rNames() {
-                Capability[] values = values();
-                String[] result = new String[values.length];
-                for (Capability c : values) {
-                    result[c.ordinal()] = c.rName;
-                }
-                return result;
-            }
-
-        }
-
-        private static final RStringVector NAMES = RDataFactory.createStringVector(Capability.rNames(), RDataFactory.COMPLETE_VECTOR);
-
-        @Specialization
-        protected RLogicalVector capabilities() {
-            byte[] data = new byte[NAMES.getLength()];
-            for (Capability c : Capability.values()) {
-                boolean value = c.defValue;
-                switch (c) {
-                    case cledit:
-                        value = RContext.getInstance().isInteractive() && !RContext.getInstance().getStartParams().getNoReadline();
-                        break;
-                }
-                data[c.ordinal()] = RRuntime.asLogical(value);
-            }
-            return RDataFactory.createLogicalVector(data, RDataFactory.COMPLETE_VECTOR, NAMES);
-        }
-    }
-}
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/ForeignFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/ForeignFunctions.java
index 0869e867e13e00f6fd6e2e40072bbf2df198656e..17d2397e93d1a4f6d8f7edc6d47285bca92f0fdb 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/ForeignFunctions.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/ForeignFunctions.java
@@ -15,6 +15,7 @@ import static com.oracle.truffle.r.runtime.RVisibility.CUSTOM;
 import static com.oracle.truffle.r.runtime.builtins.RBehavior.COMPLEX;
 import static com.oracle.truffle.r.runtime.builtins.RBuiltinKind.PRIMITIVE;
 
+import com.oracle.truffle.api.CompilerAsserts;
 import com.oracle.truffle.api.CompilerDirectives;
 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
 import com.oracle.truffle.api.dsl.Cached;
@@ -148,7 +149,8 @@ public class ForeignFunctions {
 
         private static final String UNKNOWN_EXTERNAL_BUILTIN = "UNKNOWN_EXTERNAL_BUILTIN";
 
-        protected String lookupName(RList f) {
+        protected static String lookupName(RList f) {
+            CompilerAsserts.neverPartOfCompilation();
             if (f.getNames() != null) {
                 RAbstractStringVector names = f.getNames();
                 for (int i = 0; i < names.getLength(); i++) {
@@ -287,6 +289,7 @@ public class ForeignFunctions {
         }
 
         @Override
+        @TruffleBoundary
         protected RExternalBuiltinNode lookupBuiltin(RList f) {
             String name = lookupName(f);
             switch (name) {
@@ -558,6 +561,7 @@ public class ForeignFunctions {
         private final BranchProfile errorProfile = BranchProfile.create();
 
         @Override
+        @TruffleBoundary
         protected RExternalBuiltinNode lookupBuiltin(RList f) {
             String name = lookupName(f);
             if (FastROptions.UseInternalGraphics.getBooleanValue()) {
@@ -648,6 +652,7 @@ public class ForeignFunctions {
         private final BranchProfile errorProfile = BranchProfile.create();
 
         @Override
+        @TruffleBoundary
         protected RExternalBuiltinNode lookupBuiltin(RList f) {
             if (FastROptions.UseInternalGraphics.getBooleanValue()) {
                 switch (lookupName(f)) {
@@ -718,6 +723,7 @@ public class ForeignFunctions {
         private final BranchProfile errorProfile = BranchProfile.create();
 
         @Override
+        @TruffleBoundary
         protected RExternalBuiltinNode lookupBuiltin(RList f) {
             if (FastROptions.UseInternalGraphics.getBooleanValue()) {
                 switch (lookupName(f)) {
@@ -779,6 +785,7 @@ public class ForeignFunctions {
         }
 
         @Override
+        @TruffleBoundary
         protected RExternalBuiltinNode lookupBuiltin(RList f) {
             switch (lookupName(f)) {
                 default: