sclang/identDictput: test if object is mutable before changing

this fixes #1007