state: strictLocalID tweaks

1. Return an error instead of a flag to reduce boilerplate at call
sites.

2. Use strictLocalID in more places where appropriate.