Fix dictionary changed size during iteration

Make a copy of the keys before we operate on it

Fixes LP# : 1212854

Change-Id: I431ffb3878863e9be6d1a35078f7d7c3edf4b133