protecting against additions to object prototype when iterating