Fix database update for local scope housekeeping tasks.