Rendering jinja template with non-uniform nested dictionary mapping is failing. Error is always related to 'dict object' has no attribute <'some key'>. 

```
{% for rule in INPUT %}
   {{ rule }}
   {{ INPUT[rule].target }}
{% endfor %}

```

```
INPUT:
   rule1:
     src: 1.1.1.1
     target: ACCEPT
   rule2:
     inintf: eth0
FORWARD:
   rule4:
     outintf: br-6b

```

```
FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'target'"}

```

If the yaml file is like below then it works. 

```
INPUT:
   rule1:
     src: 1.1.1.1
     target: ACCEPT
   rule2:
     inintf: eth0
     target: ACCEPT
FORWARD:
   rule4:
     target: DOCKERN
     outintf: br-6b

```

Is there any way to make it work with non-uniform dictionary mappings?