Losses in behavioural plasticity and the evolution of altruism