Fix to setobject method

Had some problems lately where this method chocked on a binding like "value[0]: whatever".