" By this stage everyone knew that massed infantry attacks against prepared positions Napoleonic style was not a good idea."
And yet, they continued to do EXACTLY that up until almost the end of the war.
The problem was that tactics were evolving, that is true, but the commanders were not evolving quickly enough to take advantage of those changes.
Why do you think the French Army mutinied in 1917?
Yes, the tactics were supposed to be new (soldiers following a creeping barrage), but even the French commanders knew that that provided little protection against German artillery counter fire, and they even expected heavy casualties from their own artillery.
Essentially, the French plan was "Lets toss these guys over the top to advance Napoleonic style and we'll see where it goes from there."
Earlier attempts to do something similar - not lifting the barrages until the troops were within X meters of the German trenches was also only marginally successful -- largely because they still couldn't figure out ways to deal with the heavily fortified, well hidden machine gun positions that could remain manned even during a suppression barrage.
Regarding the commanders issue...
Tony Ashworth's book on trench warfare indicates that while the French refused to return to the trenches, in effect mutinied, they didn't really refuse to fight -- they wanted tactical decisions made by commanders who knew the conditions on the battlefield first hand; which the French largely didn't have.
"The gift which I am sending you is called a dog, and is in fact the most precious and valuable possession of mankind" -Theodorus Gaza
Baby Jesus cries when the fat redneck doesn't have military-grade firepower.