Fix issue where an expression should not be modified in-place