Revert to deprecated FlattenException as it is not yet available in our version of Twig