Not sure if this changes anything, but it's a good choice to setup the
server before telling webkit where to look for webextensions.
     g_free(extension);
 #endif
 
-    /* Setup the extension directory. */
-    webkit_web_context_set_web_extensions_directory(webctx, EXTENSIONDIR);
-
     name  = ext_proxy_init();
     vdata = g_variant_new("(ms)", name);
     webkit_web_context_set_web_extensions_initialization_user_data(webctx, vdata);
+
+    /* Setup the extension directory. */
+    webkit_web_context_set_web_extensions_directory(webctx, EXTENSIONDIR);
 }
 
 /**