stop passing a shared variable to ensemble inputs in connect

- replace the shared variable with just its value (taken from origin)
- create the shared variable when adding the terminator