How Do In-Context Examples Affect Compositional Generalization?