Support running ForEach on non-root functions.

BUG=6000538

Change-Id: Ie2b16893b150cc5955ee4b9d028c988f69a82744
7 files changed