what happens is that when you load a world a mapping of string to int is loaded and used to map the blocks and items (and others) names to the numeric id used in the file
according to that thread 1.6.4 forge has a module that created said mapping so 1.7 installs can load without deleting half...