The modified object might not be mutable (e.g. shader input). Added a test for the case when this happens.