Prevent data pollution in foreach loop.