Bail out on dead states for ShortestPrefix/ShortestSuffix