fix Issue 11238 - Codegen error when this is a ref parameter to the method

Revert a part of the fix for issue 2356, to avoid aliasing issue.
Merge pull request #2682 from 9rnsr/fix11238

[REG2.063] Issue 11238 - Codegen error when this is a ref parameter to the method