Use the same classIndex approach as from the getStyleDescriptionForLayer:inClass:

I keep running into a crash trying to set the style description of a layer because this line is returning NSNotFound.

I thought this would be a little better than an issue but feel free to close without merging and fix it yourself. This was meant just to point out the line since I can't compile the lib or test (couldn't figure out the dependencies, are they all public?)