Fix bug 3785: custom headers not stored in queued messages (and thus,