Set twig globals on 404 pages. Fixes #2198