Could the calls to `clone` be avoided here?