Copy local frame to heap for closure if nessery