Fix 500 on removing a document's in_reply_to code