Replication unable to finish when purged doc returned in changes feed

Test for issue #376