Fixes Issue #7342 in TwigBundle