Proximate mechanisms of behavioural inflexibility: implications for the evolution of personality traits