JinjaProxy returns Jinja's Undefined when core raises an OptionalValueException or an UnsetException. From the Jinja docs I suspect StrictUndefined may be more appropriate, though there could be backwards compatibility concerns. This should be investigated (don't take the premise for granted, I haven't gone in depth).