A few fixes for the model-free duplicate() method.
Authored by: bugman 2008-07-03
Parent: [r6631]
Child: [r6633]