+The purpose of this patch is to preserve the References header if the
+In-Reply-To header is not initially present; forwarded upstream to
+http://bugs.mutt.org/3378
+
+--- a/headers.c
++++ b/headers.c
+@@ -114,8 +114,8 @@
+ $edit_headers set, we remove References: as they're likely invalid;
+ we can simply compare strings as we don't generate References for
+ multiple Message-Ids in IRT anyways */
+- if (!n->in_reply_to || (msg->env->in_reply_to &&
+- mutt_strcmp (n->in_reply_to->data,
++ if (msg->env->in_reply_to &&
++ (!n->in_reply_to || mutt_strcmp (n->in_reply_to->data,
+ msg->env->in_reply_to->data) != 0))
+ mutt_free_list (&msg->env->references);
+