But, English being English, parts of speech are descriptive, not prescriptive. I suspect maybe 10% of native speakers could tell you "the" is an article, fewer than that could tell you that it is also an adjective or an adverb, depending on what it is identifying, and almost none would come up with the "the more the merrier" formulation as a completely different thing. In the original "when more then merrier" formulation, "when" and "then" would be adverbs, though for a completely different reason.