Implement fixes for using local DBS
Skip blocks if they have no locations. Fixes #4270
Merge pull request #4266 from mmascher/local-dbs