Made the include function safe for the autoescaping

This fixes a regression introduced in ba88c75557
Fixes #1097

I have not updated the changelog as the regression is not part of a release yet