refs #651 Log _id hack deletes for replication, fix query pattern bug