Factors out type material scopes to TypeMaterial.