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