Patch Set 4:

I guess I just see things differently,  the new case being handled is an exceptional case, no style range is available at the current position.  This should be handled by resetting the cursor and returning immediately.