Fix dict iteration usage

When iterating a dict, it is redundant to create a list of keys
using the keys() method. Using iteritems() lets us iterate a dict more
efficiently.

Closes-Bug: #1384990

Change-Id: If8ffcf19129430506020adb9716a7dfdda9d98f5
Merge "Fix dict iteration usage"