Correctly rebuild local DB from core application when empty