Don't deref twice when destructing an upgrading object.
Mark unused code in object.c.