Copy fn to result before intermediate export.