Clean the threads? Sounds like an Arc AAA carried in the pocket with fluff and crud buildup kind of trouble. My Kroll clickie does that on my Opalec'ed Mini Mag. The red light comes on and if I unscrew the cap and re seat it the red light goes away.
Oxidation on raw aluminum. Icky stuff.
Also check the spring. If loose or crudded over it could act flaky also.
What kind of batteries? I had a set of NIMH cells in the above Mini that dented and became loose. Decided that longterm carry of NIMH was not the sturdiest on the cells. They flickered similar to your description. Weird.