Fix container first-run/restart logic.