IMO the battery holder has too much axial play and in some instances the electrical contact is broken for a short time which is seen by the circuit as the action of the switch.
I would extend slightly the two springs, the one in the tailcap and the one on top of the battery holder in order to ensure a permanent contact.