Fix handling of duplicate classes in dex files

There is a discussion in Dalvik.SSA of what is going on here.