fix to_intermediate for vectors
fix to_intermediate for vectors

The generated code was not clearing the vector, which was generating
an error if the same intermediate was used repeatedly.

Fix to_intermediate to have a copy semantic

doudou/modelkit-component,doudou/modelkit-component