There are several tricks to be tried if the batteries are Ni-Cads but if they are some other construction you can forget it. Ni-Cads can form internal crystals that short the battery that can be dislodged by throwing the individual cells at a hard surface. Another way to get rid of the shorts is to apply a high current from a variable DC supply across individual cells. Be careful of explosions, don't overdo it. If you know any RC modelers consult them as they are continually working on this problem.