[JS] copy function body code when evaluating it so that it doesn't go away