Fix the "Maximum function nesting level of 100 reached" error with Symfony2