In this version of the constructor: https://github.com/probcomp/Gen.jl/blob/master/src/choice_map.jl#L651-L661
This line:
assigns the value as a leaf always, leading to this erro:
julia> cm = Gen.choicemap(:k => Gen.choicemap(:v => 2))
│
└── :k : DynamicChoiceMap(Dict{Any, Any}(:v => 2), Dict{Any, Any}())
julia> Gen.has_value(cm, :k)
true
julia> Gen.has_submap(cm, :k)
false