Fix ordering of fields with the same name.

While the Java language doesn't allow multiple fields with
the same name in a single class (excluding fields from super
classes), the bytecode specification permits it and tools
such as proguard actually generate them. Define the order of
these fields by their dex file index and relax the check of
field ordering to permit identical names.

Bug: 18211592
Change-Id: I1dee9b2b669a6ea180a2d3a41030efb2aed53950
diff --git a/test/800-smali/src/Main.java b/test/800-smali/src/Main.java
index 014edc0..3a0f8ea 100644
--- a/test/800-smali/src/Main.java
+++ b/test/800-smali/src/Main.java
@@ -54,6 +54,7 @@
         testCases.add(new TestCase("FloatBadArgReg", "FloatBadArgReg", "getInt",
             new Object[]{100}, null, 100));
         testCases.add(new TestCase("negLong", "negLong", "negLong", null, null, 122142L));
+        testCases.add(new TestCase("sameFieldNames", "sameFieldNames", "getInt", null, null, 7));
     }
 
     public void runTests() {