Converted generator to list to fix premature consumption problem

For an unknown reason on production deployment, the generators supplied
by getObject are consumed before the template has a chance to do so
causing the rendered template to always have no results.