Fixed: Elements generated with the copy constructor now have an ID assigned

Previously elements that were created with the copy constructor would have a null ID field. This commit generates a new ID for the copy-constructed element.