diff -ru bash-4.2.orig/bash-4.2/builtins/declare.def bash-4.2/bash-4.2/builtins/declare.def
--- bash-4.2.orig/bash-4.2/builtins/declare.def	2010-05-31 00:25:21.000000000 +0200
+++ bash-4.2/bash-4.2/builtins/declare.def	2012-12-20 21:43:35.000000000 +0100
@@ -424,7 +424,10 @@
 	      if (flags_on & att_assoc)
 		var = make_new_assoc_variable (name);
 	      else if ((flags_on & att_array) || making_array_special)
-		var = make_new_array_variable (name);
+	        if (offset)
+		  var = make_aux_new_array_variable (name);
+	        else
+		  var = make_new_array_variable (name);
 	      else
 #endif
 
diff -ru bash-4.2.orig/bash-4.2/variables.c bash-4.2/bash-4.2/variables.c
--- bash-4.2.orig/bash-4.2/variables.c	2011-01-25 02:07:48.000000000 +0100
+++ bash-4.2/bash-4.2/variables.c	2012-12-20 21:54:11.000000000 +0100
@@ -2026,6 +2026,36 @@
 
 #if defined (ARRAY_VARS)
 SHELL_VAR *
+make_aux_new_array_variable (name)
+     char *name;
+{
+  SHELL_VAR *entry;
+  ARRAY *array;
+  VAR_CONTEXT *vc;
+  SHELL_VAR *v;
+  HASH_TABLE *table = global_variables->table;
+
+  if (shell_variables == 0)
+    create_variable_tables ();
+  for (vc = shell_variables; vc; vc = vc->down)
+    {
+      if (vc_isfuncenv (vc) || vc_isbltnenv (vc))
+	{
+	  v = hash_lookup (name, vc->table);
+	  if (v) {
+	    table=vc->table;
+	    break ;
+	  }
+	}
+    }
+  entry = make_new_variable (name, table);
+  array = array_create ();
+
+  var_setarray (entry, array);
+  VSETATTR (entry, att_array);
+  return entry;
+}
+SHELL_VAR *
 make_new_array_variable (name)
      char *name;
 {
diff -ru bash-4.2.orig/bash-4.2/variables.h bash-4.2/bash-4.2/variables.h
--- bash-4.2.orig/bash-4.2/variables.h	2010-12-03 02:22:01.000000000 +0100
+++ bash-4.2/bash-4.2/variables.h	2012-12-20 20:46:51.000000000 +0100
@@ -326,6 +326,7 @@
 
 #if defined (ARRAY_VARS)
 extern SHELL_VAR *make_new_array_variable __P((char *));
+extern SHELL_VAR *make_aux_new_array_variable __P((char *));
 extern SHELL_VAR *make_local_array_variable __P((char *));
 
 extern SHELL_VAR *make_new_assoc_variable __P((char *));
