Sufficient conditions for a Riemannian manifold to be locally symmetric