Bug 8597:
The clone method should take into account the deep parameter.