Fixing a panic in the PruneEmptyUpdateObj function