Fix crash with an insertvalue that produces an empty object.