Fixed an issue with recreating the local database as reported in issue #1150 and #1040.