Fix fallback state not recognized as such
Slightly speed up state lookup in GetStateIDs()

Exit early on first non-matching address after a match has been found
as there's no point in checking the rest of entries because they are
sorted by address.