Anonymize nested function to fix PHP fatal on multiple executions

Change-Id: Id5be2aec43dbc2c1acdf92309eba982fd9967773
Merge "Anonymize nested function to fix PHP fatal on multiple executions"