I learned that when you approximate a number with the -aine suffix, you create a feminine noun:
une centaine, une quarantaine, une dizaine...
However, in La peste by Camus (1947), I encountered this sentence:
La veille, un dizaine de malades avaient succombé dans la ville.
However, the TLFi does have interesting notes on confusion with the masculine nominalizing suffix -ain, and L'internaute lists a masculine citation from 1895:
... à la diffusion de d'un dizaine de courts-métrages ...
Incidentally — and this may be related or it may constitute a separate question — one of the citations in L'internaute includes « plusieurs dizaine de milliers » and the TLFi quotes « aux dizaines, aux centaines, aux mille ». Is it possible that the plurality of these numbers has also changed? Could they have spent some time hovering on the edge of invariability, like adverbs?
In sum, what was the status of -aine nouns in the past? Are the exceptions just mistakes?