Fix skipping part of database when restarting

If data was buffered when the daemon last stopped,
that data never got sent and just sat in the database.