diff --git a/includes/flag.admin.inc b/includes/flag.admin.inc
index ffdf9ed..0d41310 100644
--- a/includes/flag.admin.inc
+++ b/includes/flag.admin.inc
@@ -586,13 +586,20 @@ function flag_form_validate($form, &$form_state) {
  * Add/Edit flag form submit.
  */
 function flag_form_submit($form, &$form_state) {
+  // Find out whether any flags currently exist, or whether this is the first
+  // flag we are in the process of creating. If the latter, we need to clear
+  // the entity info cache, as the Field admin UI paths have not yet been
+  // registered due to flagging entity info having so far returned no bundles.
+  $all_flags = flag_get_flags();
+  $is_new_first_flag = empty($all_flags);
+
   $flag = $form['#flag'];
   $flag->form_input($form_state['values']);
 
   $flag->save();
   $flag->enable();
   drupal_set_message(t('Flag @title has been saved.', array('@title' => $flag->get_title())));
-  _flag_clear_cache();
+  _flag_clear_cache($is_new_first_flag);
 
   // Save permissions.
   // This needs to be done after the flag cache has been cleared, so that
@@ -708,14 +715,24 @@ function flag_check_link_types($element) {
 
 /**
  * Clears various caches when a flag is modified.
+ *
+ * @param $clear_entity_info
+ *  Whether to also clear the entity info cache. This is needed when no flags
+ *  exist yet, because at this point our own flag_entity_info() has so far
+ *  returned no bundles, and thus no Field admin UI paths exist.
  */
-function _flag_clear_cache() {
-  if (module_exists('views')) {
-    views_invalidate_cache();
-  }
+function _flag_clear_cache($clear_entity_info = FALSE) {
   // Reset our flags cache, thereby making the following code aware of the
   // modifications.
   drupal_static_reset('flag_get_flags');
+
+  if ($clear_entity_info) {
+    entity_info_cache_clear();
+  }
+
+  if (module_exists('views')) {
+    views_invalidate_cache();
+  }
   // The title of a flag may appear in the menu (indirectly, via our "default
   // views"), so we need to clear the menu cache. This call also clears the
   // page cache, which is desirable too because the flag labels may have
