Store the right modded material name in Material object.

This should fix a bunch of issues where plugins failed to find custom
modded items when looking up the name from the Material object in the byId
array.