Fix bug in python bindings when editing indexed strings