Allow SELECT while loading the DB.

Fixes issue #1024.