Sync_gateway changes feed contains doc id/rev, but trying to get doc returns "missing"

Couchbase Community Edition v5.1.1
Sync Gateway v1.5.2

I am using sync_gateway changes feed to sync a Couchbase bucket to my local database. The changes feed contains two docs which have been deleted, which are both marked as removed in the changes feed:

{“seq”:799515,“id”:"-K9q6dcHiQJHB-TBZzmzA7V",“deleted”:true,“removed”:[“grp:1”],“changes”:[{“rev”:“2-8537ed03ebb57e60bd995a33710bf615”}]}
,{“seq”:799518,“id”:"-okASJMiS4baYsJ9RmbsibX",“deleted”:true,“removed”:[“grp:1”],“changes”:[{“rev”:“2-03cf8e8434e2ef3731712cb43453cf2a”}]}

If I then try to get these docs for the full details, the first one gives a valid return with the doc marked as deleted, as I would expect:

Request:
https://localhost:4984/mydb/-K9q6dcHiQJHB-TBZzmzA7V?revs=true&latest=true&open_revs=%5B%222-8537ed03ebb57e60bd995a33710bf615%22%5D
Return:

[
{"ok":{"_deleted":true,"_id":"-K9q6dcHiQJHB-TBZzmzA7V","_rev":"2-8537ed03ebb57e60bd995a33710bf615","_revisions":{"ids":["8537ed03ebb57e60bd995a33710bf615","ae895c2f148cb6d4181f94b58a525db5"],"start":2}}}
]

However, the second one returns a missing property:

Request:
https://localhost:4984/mydb/-okASJMiS4baYsJ9RmbsibX?revs=true&latest=true&open_revs=%5B%222-03cf8e8434e2ef3731712cb43453cf2a%22%5D

Return:

[
{"missing":"2-03cf8e8434e2ef3731712cb43453cf2a"}
]

Why does the second one turn up in the changes feed if the doc/revision can’t be found?
What can I do to fix this so that it isn’t returned? Would a database purge help?

Thanks,
Giles

Some more info:

If I try to purge the two docs the first one (where getting the doc returns ok) works, and I see the following in the sync_gateway log:

2019-06-17T15:50:10.300+02:00 HTTP:  #5453: POST /mydb/_purge  (ADMIN)
2019-06-17T15:50:10.300+02:00 CRUD: purging document = -K9q6dcHiQJHB-TBZzmzA7V
2019-06-17T15:50:10.300+02:00 CRUD+: DeleteWithXattr called with key: -K9q6dcHiQJHB-TBZzmzA7V xattrKey: _sync

However, trying to purge the second one doesn’t do anything and I see the following in the sync_gateway log:

2019-06-17T15:47:28.720+02:00 HTTP:  #3501: POST /mydb/_purge  (ADMIN)
2019-06-17T15:47:28.721+02:00 CRUD: purging document = -okASJMiS4baYsJ9RmbsibX
2019-06-17T15:47:28.721+02:00 CRUD+: DeleteWithXattr called with key: -okASJMiS4baYsJ9RmbsibX xattrKey: _sync
2019-06-17T15:47:28.721+02:00 CRUD: Failed to purge document -okASJMiS4baYsJ9RmbsibX, err = key not found

So, the second doc really doesn’t exist (as expected) and the question remains: why is it returned in the changes feed and how do I remove it or stop the changes feed from returning it?

Thanks,
Giles