Use the result of the lookup as the loop condition directly rather than using an if..break (improves performance).