These early returns are a code smell, its means we dont have a proper handle on what is still to run when replication is complete, however it fixes a particular instance, the general fix will likely be a part of https://github.com/pouchdb/pouchdb/issues/1862