Copy shared pointer while passing across threads

* Fixes TWK-1571