Partial fix for Bug 1578: detect material type and don't load COinS unless the materi...