Fix a locking bug.

Change-Id: I183780785991d0b4165ce9186f53eb8201fb3ed5
Merge branch 'exp/storage-ng' of github.com:prometheus/prometheus into exp/storage-ng