diff --git a/dexlib/src/main/java/org/jf/dexlib/ClassDataItem.java b/dexlib/src/main/java/org/jf/dexlib/ClassDataItem.java
index a675061..3371071 100644
--- a/dexlib/src/main/java/org/jf/dexlib/ClassDataItem.java
+++ b/dexlib/src/main/java/org/jf/dexlib/ClassDataItem.java
@@ -392,6 +392,17 @@
 
     /** {@inheritDoc} */
     public int compareTo(ClassDataItem other) {
+        // An empty CodeDataItem may be shared by multiple ClassDefItems, so we can't use parent in this case
+        if (isEmpty()) {
+            if (other.isEmpty()) {
+                return 0;
+            }
+            return -1;
+        }
+        if (other.isEmpty()) {
+            return 1;
+        }
+
         if (parent == null) {
             if (other.parent == null) {
                 return 0;
@@ -409,7 +420,7 @@
      * @param classDefItem the <code>ClassDefItem</code> that this <code>ClassDataItem</code> is associated with
      */
     protected void setParent(ClassDefItem classDefItem) {
-        Preconditions.checkState(parent == null || parent.compareTo(classDefItem) == 0);
+        Preconditions.checkState(parent == null || parent.compareTo(classDefItem) == 0 || isEmpty());
         parent = classDefItem;
     }
 
@@ -498,6 +509,14 @@
     }
 
     /**
+     * @return true if this is an empty ClassDataItem
+     */
+    public boolean isEmpty() {
+        return (getStaticFieldCount() + getInstanceFieldCount() +
+                getDirectMethodCount() + getVirtualMethodCount()) == 0;
+    }
+
+    /**
      * Performs a binary search for the definition of the specified direct method
      * @param methodIdItem The MethodIdItem of the direct method to search for
      * @return The EncodedMethod for the specified direct method, or null if not found
