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.
Merge pull request #1022 from mjs/use-strictlocalid-more

state: use strictLocalID in more places where appropriate