some fixes in terms of map

Mainly, make a intermediate function to get the keys we want. 
I am already doing it. I report every problem I see and put it in the kframework issues. I am very glad that you see them because it really affects my implementation of the C semantics. However, no one reply my issues usually, and some of them are there about 4 days. I mean if you think I did not do enough to report the bug, I think I need someone to reply the issues first.