The OreDict does more than just Ores, it does basically everything that has Lists of Items.
But the Problem is the Item HashCode of Vanilla MC does not fulfill the Java Standard, yet for some reason Thermal Expansion uses that HashCode for something and that is why it crashes. This happens due to Item IDs changing and therefore the HashCode of Items changing, and if you end up with bad luck you will stumble into this Error, that cannot be fixed without either removing a Mod or restarting the World.