Be more precise when copying properties for on-the-fly classes

Instead of copying _all_ properties from the template class, or by-hand
excluding UR::Object::id, explicitly include only properties starting at
a specific point in the hierarchy
Localize the variable to a smaller scope