uutils: fix hashmap lifetime