diff --git a/py/emitnative.c b/py/emitnative.c
index f123ecbb58b01a931beb7a87a14288dc43abc3f2..278cc21e7848260405b066af9085f0d687f124ce 100644
--- a/py/emitnative.c
+++ b/py/emitnative.c
@@ -609,8 +609,11 @@ STATIC void emit_native_end_pass(emit_t *emit) {
             const_table_alloc += nqstr;
         }
         emit->const_table = m_new(mp_uint_t, const_table_alloc);
+        #if !MICROPY_DYNAMIC_COMPILER
         // Store mp_fun_table pointer just after qstrs
+        // (but in dynamic-compiler mode eliminate dependency on mp_fun_table)
         emit->const_table[nqstr] = (mp_uint_t)(uintptr_t)mp_fun_table;
+        #endif
 
         #if MICROPY_PERSISTENT_CODE_SAVE
         size_t qstr_link_alloc = emit->qstr_link_cur;
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 219f8de44b2066620f9b50b22b696d3c37dbe387..4172e175b243d95eb373002dda5089f5fa3807a1 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -338,6 +338,7 @@
 #endif
 
 // Whether the compiler is dynamically configurable (ie at runtime)
+// This will disable the ability to execute native/viper code
 #ifndef MICROPY_DYNAMIC_COMPILER
 #define MICROPY_DYNAMIC_COMPILER (0)
 #endif
diff --git a/py/nativeglue.c b/py/nativeglue.c
index 8f38ecd16e3c6dfde02287adfee51030eec88a5e..11d7a283a272ca41c6158b7c58526f80fed86c35 100644
--- a/py/nativeglue.c
+++ b/py/nativeglue.c
@@ -95,7 +95,7 @@ mp_obj_t mp_native_to_obj(mp_uint_t val, mp_uint_t type) {
 
 #endif
 
-#if MICROPY_EMIT_NATIVE
+#if MICROPY_EMIT_NATIVE && !MICROPY_DYNAMIC_COMPILER
 
 STATIC mp_obj_dict_t *mp_native_swap_globals(mp_obj_dict_t *new_globals) {
     if (new_globals == NULL) {