Similarly pull the check out of the inner loop for 'each'