I see the problem here. To help identify exactly where the cursor is, press Ins to enable overwrite mode. Now put the cursor on top of the ) after "wKey1" (the red bracket) and you will see that the corresponding bracket is not highlighted. Next, move right to the green one, and the previous one is highlighted, not the green one. Now move to the blue one, and the correct pair is highlighted.
Seems when the cursor is on a closing bracket, the IDE looks behind the cursor and highlights the previous pair if one exists. When the cursor is on an opening bracket, the correct pair is highlighted.