Test replication of empty database

Test for regression identified in #1307.