Reverted broken change. Changed iterator to global scope.