A cognitive mechanism that aids learning in stable niches but fails under environmental change canno...