Reduce a loop for simplicity. (4.5.1)

Since the value is irrelevant in the loop, the keys method is now used
instead of items.