Most grammarians are trying to analyze the big mess construction as a noun phrase, but it seems to me that the construction is actually headed by an adjective.
Mary was good
Here, "good" is a predicative adjective.
Mary was as good as Linda
"as...as" is an adverb of degree specifying how good she is. But there is still some ambiguity. She was as good at what?
Mary was as good a cook as Linda
Now the whole phrase "as good a cook as Linda" becomes what is known as the "big mess construction". But, it's my strong belief that the adjective good is the head of the phrase and not the noun cook.
The mysterious part in bold that defies all grammatical explanation can only consist of a noun with an indefinite article, and it only accompanies adverbs of degree, such as "too", "so", "as" etc .
Is it possible that the phrase in bold (a cook) is a complement of 'as' and other adverbs of degree that clarifies what Mary was as good at being?