call #forEachClosure for variable initialization code as well in optimizer (amends commit 5a5436c)