the next thing to do is figure out why xname2 is

modifying obj when it should be doing a read only operation of creating
a string with the object's name.

it's writing to obj->known, obj->dknown, and obj->bknown when you ask
for the object's name. if we remove this write operation, will the rest
of the code work? can probably find out by seeing where else these
fields are read and if perhaps we can replace them with functions that
do the operation that xname2 is caching.