qdict: Make qdict_flatten() shallow-clone-friendly