The gospel of Thomas is out of line with the canon of scripture - was written much later (in the Gnostic period) - that's why is was NOT included in the canon of Scripture - which was established long before Aquinas ever lived.