Hey,
It's something you didn't understand, not a bug.
You have added a "variable", not a key to the dictionary.
In this capx, you'll find the right way to store a key in a dictionary, and to retrieve it after. I also commented a line showing how to get the variable you had set in the first place.