ForEachExpand: Create ForEachStub type in separate function

This also removes code duplication.

No functional change intended.

Change-Id: If00fced7db10c37306879fa633aa4453e84d98f0
1 file changed