Fix problem with container cloning (issue 476).