Cache variable iterable in Scope (#14151)

Change-Id: I9aabf4212d0fdb50f61e1510f9efb633fff85370