When overconfident agents slow down collective learing