Fixes issue #292 and the uniqueID method

Multiple clones were added for no apparent reason. Also uniqueID only
fixed the id's of sub elements due to the use of find().
Merge pull request #1001 from reec/clone-fix

Fixes issue #292 and the uniqueID method