This box of matches is empty
The authors of the English writing guide book argue that if a box contains matches, it cannot, logically speaking, be empty. For if it is empty, it returns to its original state or function prior to it containing the matches, that is, being a box.
Allow me to illustrate by providing a more outlandish example. I have cupboards in my kitchen, in one I keep tea and coffee cups, saucers and teapots; in another there are plates and bowls of different sizes; but in one cupboard I keep only tins of tuna fish. I call it the "cupboard of tuna fish". I keep it well-stocked for months on end, until one day I decide that I am tired of eating tuna and I empty the cupboard out. Is that piece of furniture still a "cupboard of tuna fish"? Not if I fill it with pots and pans. Now the cupboard contains something completely different. I could, if I wanted to, refer to it as "that's the cupboard of pots&pans".
However, if that cupboard was manufactured and designed specifically to contain only tuna fish tins (or tuna cans/canned tuna) then it is, for all intents and purposes, a tuna fish cupboard; I could even shorten it to tuna-cupboard, and over time I could spell it as one word "tunacupboard". The noun, tuna fish (or tuna) describes the purpose or quality of the cupboard, just like a wine bottle tells us it is a bottle specifically made for wine; a can containing beer is called a beer can; a basket for carrying fruit is a fruit basket. The first noun in the following compound words can either describe a quality or the purpose/functionality of the last noun: silver photo frame; plastic shopping bag; 16GB memory card; all-in-one printer; portable air conditioner; teapot cosy (tea pot / tea-pot) ; etc.
The first noun (or nouns) in a compound word is called an adjunct noun or an attribute noun, it modifies another noun and functions as an adjective, it can be removed leaving the meaning of the second noun intact e.g A
silver photo frame (a frame for photos); a photo frame (now it could be any frame); a all-in-one printer (a machine which prints texts and images on paper).
However, when faced with the term matchbox we don't normally think of it as a compound word, i.e., a box for containing matches, we see it as a single word, the union of more than onefree morpheme, otherwise known as a solid compound. In fact Online Etymology tells us that it used to be spelled match-box, and dates it back to 1786. But nowadays the spelling of matchbox is firmly established. Of course it's still "a box of matchsticks" (matchsticks = "thin sticks of wood for striking a fire".) For the authors to claim that the phrase "This box of matches is empty" is incorrect, is without doubt prescriptivism of the worst kind.
TL;DR: No, it is not a grammatical error.
Compounding and Word Division
A compound term is a combination of two or more words that, to varying
degrees, have become unified in form and meaning through frequent use
together. In many cases only one syllable in the compound is stressed.
The trend over the years has been for the English compound to begin as
two separate words, then be hyphenated and finally, if there is no
structural impediment to union, become a single word written without a
space or hyphen. Whatever its form, the compound frequently serves to
avoid circumlocution and create a more concise style.
The existence of three different forms for compounds leads to
considerable instability and variation in their presentation, and
hyphenation has become one of the most controversial points of
editorial style. Dictionaries vary widely in the forms they choose for
specific compounds: "hot-line" in the Gage Canadian Dictionary, "hot
line" in the Canadian Dictionary of the English Language and "hotline"
in The Concise Oxford Dictionary, for example.
The Canadian Style: Writing Tools
Wikipedia says this on prescriptivism
Although many people would agree that some kinds of prescriptive
teaching or advice are desirable, prescriptivism is often subject to
criticism. Many linguists, such as Geoffrey Pullum and other posters
to Language Log, are highly skeptical of the quality of advice given
in many usage guides, including highly regarded books like Strunk and
White's Elements of Style. In particular, linguists point out that
popular books on English usage written by journalists or novelists
(e.g. Simon Heffer's Strictly English : the correct way to write ...
and why it matters) often make basic errors in linguistic analysis
A second problem with prescription is that prescriptive rules quickly
become entrenched and it is difficult to change them when the language
changes. Thus, there is a tendency for prescription to be excessively
conservative. When in the early 19th century, prescriptive use advised
against the split infinitive, the main motivation was that this
construction was not in fact a frequent feature of the varieties of
English favoured by those prescribing. The prescriptive rule was based
on a descriptive observation. Today the construction has become common
in most varieties of English, and a prohibition is no longer supported