settings/store: Fix lock inversion

Fixes #1837