Fix `instantiate_with_code` with already uploaded code (#594)

8 jobs for master in 14 minutes (queued for 2 minutes and 19 seconds)