Don't iterate over Stack.resources dictionary

Now that parser.Stack is a proper Mapping, we can iterate over its
keys/values/items directly instead of accessing the resources attribute.

Change-Id: I6bd9f357c21a0e75623a71543e981d3f4f87fcbe
Merge "Don't iterate over Stack.resources dictionary"