cluster/container: fix error handling in WaitContainer