let element_for_literal context literal =
match (context.index#find literal)#find literal.Term.atom with
| None ->
(* compacted *)
let found = ref None in
begin
try
Stack.iter
(fun element ->
if Term.literal_equal element.el_literal literal then begin
found := Some element;
raise Exit
end
)
context.context;
!found
with
| Exit ->
!found
end
| element ->
element