Ensure that an object is registered before adding it to the cache
Ensure that an object is registered before adding it to the cache

We need to ensure that an object is registered before putting it in the
cache, since registering the object adds the weak_ref that we use to know
when the object should be removed from the cache.  Prevents a crash in
GetItems.

Distrotech/at-spi2-atk,GNOME/at-spi2-core,GNOME/at-spi2-atk,GNOME/at-spi2-core,GNOME/at-spi2-core,Distrotech/at-spi2-atk