diff --git a/core/modules/image/image.module b/core/modules/image/image.module
index a0816e4..84a6fe0 100644
--- a/core/modules/image/image.module
+++ b/core/modules/image/image.module
@@ -583,7 +583,10 @@ function image_style_options($include_empty = TRUE) {
   if ($include_empty && !empty($styles)) {
     $options[''] = t('<none>');
   }
-  $options = array_merge($options, drupal_map_assoc(array_keys($styles)));
+  // Use the array concatenation operator '+' here instead of array_merge(),
+  // because the latter loses the datatype of the array keys, turning
+  // associative string keys into numeric ones without warning.
+  $options = $options + drupal_map_assoc(array_keys($styles));
   if (empty($options)) {
     $options[''] = t('No defined styles');
   }
diff --git a/core/modules/image/image.test b/core/modules/image/image.test
index 2c422a7..0a5235c 100644
--- a/core/modules/image/image.test
+++ b/core/modules/image/image.test
@@ -368,6 +368,20 @@ class ImageAdminStylesUnitTest extends ImageFieldTestCase {
   }
 
   /**
+   * Test to make sure that an numeric image style gets displayed as am option.
+   */
+  function testNumericStyleName() {
+    $style_name = rand();
+    $edit = array(
+      'name' => $style_name,
+    );
+    $this->drupalPost('admin/config/media/image-styles/add', $edit, t('Create new style'));
+    $this->assertRaw(t('Style %name was created.', array('%name' => $style_name)), t('Image style successfully created.'));
+    $options = image_style_options();
+    $this->assertTrue(array_key_exists($style_name, $options), t('Array key %key exists.', array('%key' => $style_name)));
+  }
+
+  /**
    * General test to add a style, add/remove/edit effects to it, then delete it.
    */
   function testStyle() {
