fix jinja rendering of nested structures

fix attempt for saltstack/salt#8066