Better trace for nested jinja errors

related to #9509, please note that i fixed the other jinja 2.2.1 error, but i dont suceed to reproduce the mock test errors