fix for issue #1833 - makes res.locals available to hjs templates