Identifying the origin of local flexibility in a carbohydrate polymer