diff --git a/views/views_plugin_style_geojson.inc b/views/views_plugin_style_geojson.inc
index e630fdf..dee870e 100644
--- a/views/views_plugin_style_geojson.inc
+++ b/views/views_plugin_style_geojson.inc
@@ -30,6 +30,9 @@ class views_plugin_style_geojson extends views_plugin_style {
   function init(&$view, &$display, $options = NULL) {
     parent::init($view, $display, $options);
 
+    // Pretty-print the JSON.
+    module_load_include('inc', 'views_geojson', 'views_geojson.helpers');
+
     // Search api indexes store the entity metadata in the views data array.
     if (strpos($view->base_table, 'search_api_index_') === 0) {
       $views_data = views_fetch_data();
@@ -39,8 +42,6 @@ class views_plugin_style_geojson extends views_plugin_style {
       }
     }
     else {
-      // Pretty-print the JSON.
-      module_load_include('inc', 'views_geojson', 'views_geojson.helpers');
       foreach (entity_get_info() as $key => $info) {
         if ($view->base_table == $info['base table']) {
           $this->entity_type = $key;
