A consensus is not the same as unanimity. The Shepard of Hermas was someimes used in the liturgy and Revelation was not. Given that the Reformers had proclaimed the Bible as the sole rule of faith,however, it now became critical, did it not, what exactly would be called Scripture and what not? Before,as you say, the canon had been rather loosely defined. Now it could not be because it had become the focus of theological argument. Luther made it so.
For sure the rise of the Reformation made the need for an indisputable (per Rome) canon, but it certainly was not Luther who made Scripture the focus of theological argument, and if that was more the case with Rome, i think it would have resulted in a much earlier final infallible definition of the canon.
As it was, there was a good degree of historical “consensus” on each side of the canon dispute, and Luther’s opposition to Purgatory and position of the supremacy of Scripture (not to the exclusion of tradition) necessitated 2 Mac. to at least be part of the Scriptures,
As for Revelation vs The Shepard of Hermas, the character of writings which were Scripture, like human character, became more manifest in time, and by the fifth century the East, with a few exceptions, had come to accept the Book of Revelation as canonical.