Added simple capture of outer variables.

[Delivers #55540798]
Self-review