code gatherer: optimize by using a shallow clone
code gatherer: fixed a bug in the source export