Fix db_flatfile not clearing databases on save if there are no objects left of that type (it will leave the old database with old objects currently)