In fact, during my September 3, 2009 dialogue with Timothy George at Wheaton College, we briefly discussed St. Thomas' denial of the doctrine, with Dr. George maintaining that Catholicism would have done well in not straying from the Angelic Doctor on this matter. One of the points I made in the dialogue was that St. Thomas' understanding of Mary's holiness was far from the Protestant view. To be sure, for St. Thomas, Mary was indeed conceived with original sin. Nevertheless, it was removed by God after she was conceived (technically, after she was "animated"). She was also the recipient of an abundance of grace so that she may be protected from all actual sin. So, St. Thomas' view, though not the view currently held by the Church as dogma, contained within it some of the same logic on which the Church's dogma is based. Here is St. Thomas from Summa Theologica, III, q. 27:
....The Church celebrates the feast of our Lady's Nativity. Now the Church does not celebrate feasts except of those who are holy. Therefore even in her birth the Blessed Virgin was holy. Therefore she was sanctified in the womb.
.... Nothing is handed down in the canonical Scriptures concerning the sanctification of the Blessed Mary as to her being sanctified in the womb; indeed, they do not even mention her birth. But as Augustine, in his tractate on the Assumption of the Virgin, argues with reason, since her body was assumed into heaven, and yet Scripture does not relate this; so it may be reasonably argued that she was sanctified in the womb. For it is reasonable to believe that she, who brought forth "the Only-Begotten of the Father full of grace and truth," received greater privileges of grace than all others: hence we read (Luke 1:28) that the angel addressed her in the words: "Hail full of grace!"
Moreover, it is to be observed that it was granted, by way of privilege, to others, to be sanctified in the womb; for instance, to Jeremias, to whom it was said (Jeremiah 1:5): "Before thou camest forth out of the womb, I sanctified thee"; and again, to John the Baptist, of whom it is written (Luke 1:15): "He shall be filled with the Holy Ghost even from his mother's womb." It is therefore with reason that we believe theBlessed Virgin to have been sanctified before her birth from the womb.
.... Even in the Blessed Virgin, first was that which is natural, and afterwards that which is spiritual: for she was first conceived in the flesh, and afterwards sanctified in the spirit.
.... Augustine speaks according to the common law, by reason of which no one is regenerated by the sacraments, save those who are previously born. But God did not so limit His power to the law of the sacraments, but that He can bestow His grace, by special privilege, on some before they are born from the womb.
.... The Blessed Virgin was sanctified in the womb from original sin, as to the personal stain; but she was not freed from the guilt to which the whole nature is subject, so as to enter into Paradise otherwise than through the Sacrifice of Christ; the same also is to be said of the Holy Fathers who lived before Christ.
.... Original sin is transmitted through the origin, inasmuch as through the origin the human nature is transmitted, and original sin, properly speaking, affects the nature. And this takes place when the off-spring conceived is animated. Wherefore nothing hinders the offspring conceived from being sanctified after animation: for after this it remains in the mother's womb not for the purpose of receiving human nature, but for a certain perfecting of that which it has already received....
.... Augustine says (De Nat. et Grat. xxxvi): "In the matter of sin, it is my wish to exclude absolutely all questions concerning the holy Virgin Mary, on account of the honor due to Christ. For since she conceived and brought forth Him who most certainly was guilty of no sin, we know that an abundance of grace was given her that she might be in every way the conqueror of sin."
.... God so prepares and endows those, whom He chooses for some particular office, that they are rendered capable of fulfilling it, according to 2 Corinthians 3:6: "(Who) hath made us fit ministers of the New Testament." Now the Blessed Virgin was chosen by God to be His Mother. Therefore there can be no doubt that God, by His grace, made her worthy of that office, according to the words spoken to her by the angel (Luke 1:30-31): "Thou hast found grace with God: behold thou shalt conceive," etc. But she would not have been worthy to be the Mother of God, if she had ever sinned. First, because the honor of the parents reflects on the child, according to Proverbs 17:6: "The glory of children are their fathers": and consequently, on the other hand, the Mother's shame would have reflected on her Son. Secondly, because of the singular affinity between her and Christ, who took flesh from her: and it is written (2 Corinthians 6:15): "What concord hath Christ with Belial?" Thirdly, because of the singular manner in which the Son of God, who is the "Divine Wisdom" (1 Corinthians 1:24) dwelt in her, not only in her soul but in her womb. And it is written (Wisdom 1:4): "Wisdom will not enter into a malicious soul, nor dwell in a body subject to sins."