sclang/identDict_put: test if object is mutable before changing

this fixes #1007
Merge pull request #1012 from mortuosplango/identdict-freeze-fix

sclang/identDictput: test if object is mutable before changing