Add an example with foreach
Fix for lazy loading outside scope