This may not be your problem, but I no longer shake flashlights any more. I use an anti-oxidizing grease called Penetrox. You can pick it up in the electrical dept of any decent hardware store.
Flash lights are made up of multiple electrical contact points that rely soley on a bit of pressure to complete the pathway (battery to spring, bulb to battery, switch contact to chasis of bulb, etc). If one or more of these contacts has oxidized or has minimal contact pressure the resistance goes up and the voltage goes down. <img src="/images/graemlins/frown.gif" alt="" />
I look in the flashlight for all contact points for the current flow (battery ends, spring, base of bulb, side of bulb, etc). I use a pencil eraser followed by a bit of rubbing alcohol to clean the contact points. Last, I put a thin film of the grease on the contact points (including the battery ends). Sometimes I will tweak a spring or contact point a bit to increase the pressure.
It is truely amazing. The flashlights always have a consistant output (no need to shake to perk up the lumens). Many of my flashlights have been brighter after this treatment as well.
If this doesn't work your flashlight may be suffering from a cold solder joint in the tail cap or head.
D'oh! I just unscrewed the cap of my New Infinity to look it over and the *&%$# "O" ring broke! These guys need to do a better job with the O rings. My little Gerber AAA LED light has an O ring that is too small. The cap can unscrew in your pocket, or tighten up and inadvertantly turn on (not good for battery life). I put a couple of wraps of teflon tape on the threads, but it is not long before the thing is loose again.
Maybe time to buy and ARC <img src="/images/graemlins/smile.gif" alt="" />
Good luck, TR