"Error during SQLite query" in CBLite.NET logs

We are getting the following error during replication for some documents:

2017-06-22 00:00:44,234 DEBUG [3508] [CBLog] [SYNC (Puller)] Puller 8a3263a1-0edb-4f7a-83f3-e0740a833a6c inserting 4 revisions...
2017-06-22 00:00:44,234 DEBUG [Database Thread] [CBLog] [SYNC (Puller)] Inserting patientCareRecord_5f96e998-b252-e711-80ed-005056a8748b_43c56ded-479b-4bc0-b196-84accaee3b9e ["6-2fc1e1633b94cdbb9b28e03e6bc18301","5-831265ff584d5c1e64c7912381009496","4-bd5f59735c5deeabad5f316bbeb66b91"]
2017-06-22 00:00:44,250 ERROR [Database Thread] [CBLog] [DATABASE (SqliteCouchStore)] Error during SQLite query, throwing CouchbaseLiteException (NotFound)
2017-06-22 00:00:44,265 WARN  [Database Thread] [CBLog] [SYNC (Puller)] Puller 8a3263a1-0edb-4f7a-83f3-e0740a833a6c failed to write {patientCareRecord_5f96e998-b252-e711-80ed-005056a8748b_43c56ded-479b-4bc0-b196-84accaee3b9e #6-2fc1e1633b94cdbb9b28e03e6bc18301}: status=NotFound
2017-06-22 00:00:44,265 INFO  [Database Thread] [CBLog] [SYNC (Replication)] Error set during replication (application may continue)
Couchbase.Lite.CouchbaseLiteException: Error during SQLite query
   at Couchbase.Lite.Storage.SQLCipher.SqliteCouchStore.LoadRevisionBody(RevisionInternal rev)
   at Couchbase.Lite.Database.LoadRevisionBody(RevisionInternal rev)
   at Couchbase.Lite.Database.GetAttachmentsFromDoc(String docId, RevisionID revId)
   at Couchbase.Lite.Database.<ProcessAttachmentsForRevision>c__AnonStoreyA.<>m__0(String name, IDictionary`2 attachInfo)
   at Couchbase.Lite.Internal.RevisionInternal.MutateAttachments(Func`3 mutator)
   at Couchbase.Lite.Database.ProcessAttachmentsForRevision(RevisionInternal rev, IList`1 ancestry)
   at Couchbase.Lite.Database.ForceInsert(RevisionInternal inRev, IList`1 revHistory, Uri source)
   at Couchbase.Lite.Replicator.Puller.<InsertDownloads>c__AnonStorey3.<>m__0()

Is there any additional logging I can enable that would provide more detail? It looks potentially related to another issue we are having with attachments not being downloaded and the logs reporting “Unable to find ‘stub’ attachment in history (1)”.

You can turn up the log level on the database domain but it looks like you have already done that. I can’t quite tell what is going on from this but it looks familiar for some reason…if I remember something I will post it here.