Fix twig errors when generating html doc

This PR fixes https://github.com/nelmio/NelmioApiDocBundle/issues/324 and another error.