some fixes in terms of map

Mainly, make a intermediate function to get the keys we want. 
I guess that should be ".K" instead of "K"-- it might be good to run this through the maude backend occasionally to pick up these issues, but I suppose they'll be caught eventually regardless.