Well, suffer at the hands of the pedant no more! In fact, the tune was discovered in a 15th-century processionale, and a funeral responsory in particular. Here is Mary Berry on the topic, from an introduction to an edition of Veni:
The well-known Advent hymn O Come, O Come, Emmanuel belongs to the ever-growing repertoire of popular hymns known, loved, and sung all over the English-speaking world. It made its first appearance as far back as 1854, in Part II of the Hymnal Noted, edited by Thomas Helmore. The English words are based on a free Latin paraphrase of the great O Antiphons, which are sung with the Magnificat at Vespers on the days leading up to Christmas Eve. These antiphons themselves came into existence at least as early as the eighth century. The paraphrase can he traced back to the seventh edition of the Psalteriolum Cantionum Catholicarum, published in Cologne in 1710. The present splendid English translation was made by Thomas Alexander Lacey (1853-1931) for the English Hymna1 (1906), of which he was joint editor.
The familiar melody was said by Thomas Helmore to have been "copied by the late J. M. Neale from a French Missal" which he located “in the National Library, Lisbon." But in a letter to the press in 1909, H. Jenner claimed that his father, Bishop Jenner, had copied both the tune and the words in Lisbon in 1853. All attempts to track it down, however, failed: neither a "French Missal," nor indeed any service-book from Lisbon could be produced to justify either claim. The compilers of the 1909 historical edition of Hymns Ancient and Modern drew a complete blank, and, more recently, one scholar even made the ingenious suggestion that Thomas Helmore had perhaps composed the tune himself, coyly hiding his identity behind the pretence that it was an ancient tune gleaned from a Continental source.
I was able, however, in 1966, to vindicate his honor. My attention had been drawn to a small fifteenth century processional in the Paris Bibliothèque Nationale. It was Franciscan in origin and probably intended far the use of nuns rather than friars. Turning the pages I discovered, on folio 89v ff, a number of troped verses for the funeral responsory Libera me in the form of a litany, beginning with the words "Bone iesu, dulcis cunctis.” The melody of these tropes was none other than the tune of O come, O come Emmanuel. It appeared in square notation on the left-hand page, and on the opposite page there was a second part that fitted exactly, like a mirror-image, in note-against-note harmony with the hymn-tune. The book would thus have been shared by two sisters, each singing her own part as they processed.
So it would seem that this great Advent hymn-tune was not, in the first instance, associated with Advent at all, but with a funeral litany of the saints in verse, interspersed between the sections of a well-known responsory. Perhaps it is a measure of Helmore's genius that he detected in this melody an appropriate Advent sound as well, one which conveys an unmistakable sense of solemn expectancy, not only for the Nativity of Christ, but also for his Second Coming as judge and as savior. Helmore was shrewd enough, also, to have been aware that an indubitable link exists between the theology of Advent and a procession marking the passage from death to eternal life.