Symmetry and phaselocking in chains of weakly coupled oscillators