Fix copying of ReferenceField