diff --git a/src/abg-ir.cc b/src/abg-ir.cc
index c6f7c13e..b0db9c39 100644
--- a/src/abg-ir.cc
+++ b/src/abg-ir.cc
@@ -23606,7 +23606,7 @@ types_have_similar_structure(const type_base* first,
 	  || ty1->get_dimension_count() != ty2->get_dimension_count()
 	  || !types_have_similar_structure(ty1->get_element_type(),
 					   ty2->get_element_type(),
-					   indirect_type))
+					   true))
 	return false;
 
       return true;
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index 84447185..f1d7ee45 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -184,6 +184,11 @@ test-abidiff-exit/test-headers-dirs/test-headers-dir-v0.c \
 test-abidiff-exit/test-headers-dirs/test-headers-dir-v0.o \
 test-abidiff-exit/test-headers-dirs/test-headers-dir-v1.c \
 test-abidiff-exit/test-headers-dirs/test-headers-dir-v1.o \
+test-abidiff-exit/test-non-leaf-array-v0.c \
+test-abidiff-exit/test-non-leaf-array-v0.o \
+test-abidiff-exit/test-non-leaf-array-v1.c \
+test-abidiff-exit/test-non-leaf-array-v1.o \
+test-abidiff-exit/test-non-leaf-array-report.txt \
 \
 test-diff-dwarf/test0-v0.cc		\
 test-diff-dwarf/test0-v0.o			\
diff --git a/tests/data/test-abidiff-exit/test-non-leaf-array-report.txt b/tests/data/test-abidiff-exit/test-non-leaf-array-report.txt
new file mode 100644
index 00000000..f13cd0d4
--- /dev/null
+++ b/tests/data/test-abidiff-exit/test-non-leaf-array-report.txt
@@ -0,0 +1,11 @@
+Leaf changes summary: 1 artifact changed
+Changed leaf types summary: 1 leaf type changed
+Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
+Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
+
+'struct buzz at test-non-leaf-array-v0.c:1:1' changed:
+  type size changed from 32 to 64 (in bits)
+  there are data member changes:
+    type 'int' of 'buzz::a' changed:
+      type name changed from 'int' to 'long int'
+      type size changed from 32 to 64 (in bits)
diff --git a/tests/data/test-abidiff-exit/test-non-leaf-array-v0.c b/tests/data/test-abidiff-exit/test-non-leaf-array-v0.c
new file mode 100644
index 00000000..9594c396
--- /dev/null
+++ b/tests/data/test-abidiff-exit/test-non-leaf-array-v0.c
@@ -0,0 +1,12 @@
+struct buzz {
+  int a;
+};
+
+struct flexible {
+  long count;
+  struct buzz lightyear[0];
+};
+
+struct flexible var;
+void fun(struct flexible flex) { (void) flex; }
+
diff --git a/tests/data/test-abidiff-exit/test-non-leaf-array-v0.o b/tests/data/test-abidiff-exit/test-non-leaf-array-v0.o
new file mode 100644
index 0000000000000000000000000000000000000000..f45eecb207f8ed7a78ae672d348ec9995b25b378
GIT binary patch
diff --git a/tests/data/test-abidiff-exit/test-non-leaf-array-v1.c b/tests/data/test-abidiff-exit/test-non-leaf-array-v1.c
new file mode 100644
index 00000000..516c8b1f
--- /dev/null
+++ b/tests/data/test-abidiff-exit/test-non-leaf-array-v1.c
@@ -0,0 +1,12 @@
+struct buzz {
+  long a;
+};
+
+struct flexible {
+  long count;
+  struct buzz lightyear[0];
+};
+
+struct flexible var;
+void fun(struct flexible flex) { (void) flex; }
+
diff --git a/tests/data/test-abidiff-exit/test-non-leaf-array-v1.o b/tests/data/test-abidiff-exit/test-non-leaf-array-v1.o
new file mode 100644
index 0000000000000000000000000000000000000000..298dda06b0fbf53e001eede352f049a0196e5264
GIT binary patch
diff --git a/tests/test-abidiff-exit.cc b/tests/test-abidiff-exit.cc
index bb0262bb..bf1facc4 100644
--- a/tests/test-abidiff-exit.cc
+++ b/tests/test-abidiff-exit.cc
@@ -337,6 +337,17 @@ InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test-headers-dirs/test-headers-dir-report-2.txt",
     "output/test-abidiff-exit/test-headers-dirs/test-headers-dir-report-2.txt"
   },
+  {
+    "data/test-abidiff-exit/test-non-leaf-array-v0.o",
+    "data/test-abidiff-exit/test-non-leaf-array-v1.o",
+    "",
+    "",
+    "",
+    "--leaf-changes-only",
+    abigail::tools_utils::ABIDIFF_ABI_CHANGE,
+    "data/test-abidiff-exit/test-non-leaf-array-report.txt",
+    "output/test-abidiff-exit/test-non-leaf-array-report.txt"
+  },
   {0, 0, 0 ,0, 0, 0, abigail::tools_utils::ABIDIFF_OK, 0, 0}
 };
 
