A while back I spent some time looking at some confusing behavior related to GDB values with different static and dynamic times; that's in the same neighborhood as the VALUE_ENCLOSING_TYPE stuff, so this might be helpful. I wanted to fix this myself, but I never had the time.