fix Issue 6652 - 2. Deprecate modifying non ref variable.
Merge pull request #1009 from 9rnsr/fix6652_2

fix Issue 6652 - 2. Deprecate modifying non ref variable.