Bail out on dead states for ShortestPrefix/ShortestSuffix
Merge pull request #9 from kartynnik/master

Bail out on dead states for ShortestPrefix/ShortestSuffix