fix Issue 12316 - AA.get broken for Object VAL types

More better fix for the issue 7757.
[Refactoring] around toDelegate call
Merge pull request #3369 from 9rnsr/fix12316

[REG2.066a] Issue 12316 - AA.get broken for Object VAL types