Probably something borderline:
I have here some test code where retrieval of all key-value pairs from a Dict works with findall/3, but fails with bagof/3. I have tried a few ways to do it, commented out here, but the one currently commented in should work as I see it. Instead, bagof/3 just fills the bag with a single solution:
:- begin_tests(dicts).
empty_dict(foo{}).
nonempty_dict(foo{x:alpha, y:bravo, z:charlie}).
bagof_call(Value,Dict,Key) :- (Value = Dict.Key).
% Using bagof/3 to get all key-value pairs out of a dict
test(test01_get_all_content_using_bagof, [true(T)]) :-
nonempty_dict(Dict),
% bagof(Key-Value, Value = Dict.get(Key), Bag), % NO
% bagof(Key-Value, get_dict_ex(Key,Dict,Value), Bag), % NOT FOUND
% bagof(Key-Value, bagof_call(Value,Dict,Key), Bag), % YES
% bagof(Key-Value, get_dict(Key,Dict,Value), Bag), % YES
bagof(Key-Value, (Value = Dict.Key), Bag), % NO
keysort(Bag,SortedBag),
T = (SortedBag == [x-alpha, y-bravo, z-charlie]).
% Using findall/3 to get all key-value pairs out of a dict
test(test02_get_all_content_using_findall, [true(T)]) :-
nonempty_dict(Dict),
% findall(Key-Value, Value = Dict.get(Key), Bag), % YES
% findall(Key-Value, get_dict_ex(Key,Dict,Value), Bag), % NOT FOUND
% findall(Key-Value, get_dict(Key,Dict,Value), Bag), % YES
findall(Key-Value, (Value = Dict.Key), Bag), % YES
keysort(Bag,SortedBag),
T = (SortedBag == [x-alpha, y-bravo, z-charlie]).
:- end_tests(dicts).
rt(dicts) :- run_tests(dicts).