fix Issue 12420 - [AA] Can't set associative array with array as key value using key type

And add test case for issue 2954.