Fixed missing globals by borrowing them from the Jinja environment