Correct material id set by TGDMLParse. Remove unused variables.