fix Issue 11215 - `inout` lose enclosing `shared` on resolution
Merge pull request #2658 from 9rnsr/fix11215

Issue 11215 - `inout` lose enclosing `shared` on resolution