serf: Prevent stateLock from being held for too long. Fixes #1.