Fix twig_first and twig_last filters for UTF8 multibyte strings