Move the cloning of the function body much earlier in the inlinefunction