Remove dict.keys() when not need it

In a for loop over a dictionary we don't need to use the `keys`
methods.

Thanks very much to @gvwilson for raise the same problem in
another pull request.
Merge remote-tracking branch 'raniere/keys'