Python3: do not index a dict_keys object

This avoids getting this error:

    TypeError: 'dict_keys' object does not support indexing

Change-Id: I662d9e0206e7346069e30fa14182886e8865a61e