don't use references when iterating per feedback for WEB-6276