Yes; in each case, rather than scanning the recently-made copy, scan the original from which it was just copied.
Partly to make it clear we don't need the copy for this; but also because this leaves a clever compiler the freedom to reorder the two function calls or even, if it inlines them, interleave them.