Prototype safe for loop fix

It's not safe to use for in loops since those loop all enumerable properties in the object’s prototype chain, custom native properties will unexpectedly be included in such iterations.