Fix for bug #1546 where a deep copy was attempted of DOM elements (which isn't needed).