One other point:
While it is generally frowned upon, I have modified the foam in every helmet I have worn. I am not talking about removing large amounts of material, but to get a perfect fit I will shave a millimeter or two in areas that cause "hot spots" or add a layer or two 1/16th inch closed cell foam in areas using double sided carpet tape to get a custom and comfortable fit. So, I always pull out the liner and take a look at the guts of a new helmet before I buy to see what is there. Sometimes there is a really good helmet that has some excess foam from the moulding process or something.
Given all the variables going on in a crash, I think having a very even fit to distribute the energy is much more critical than a millimeter or two of foam from the total thickness.