Flexibility and constraint in the evolution of gene expression and behavior