Runtime support for closure copying