Fix attach race condition, improve unit tests, make sure the container is started before unblocking Start