fix Issue 10928 - Fails to create closures that reference structs with dtor