This can lead to missing values when dumps, saves, and other global actions are handled. The correct iterator is
for ( prop=obj->oclass->pmap; prop!=NULL; prop=(prop->next?prop->next:(prop->oclass->parent?prop->oclass->parent->pmap:NULL)) ) { // ... }