Fix a crash with dynamically generated tool parts (bolts) trying to get a material name shorter than 9 characters.