The out-of-sync is a bug, but rather innocent. The reason it doesn’t work is this snipped from the sandboxing code:
%! safe_assert(+Term) is semidet.
% True if assert(Term) is safe, which means it asserts in the
% current module. Cross-module asserts are considered unsafe. We
% only allow for adding facts. In theory, we could also allow for
% rules if we prove the safety of the body.
safe_assert(C) :- cyclic_term(C), !, fail.
safe_assert(X) :- var(X), !, fail.
safe_assert(_Head:-_Body) :- !, fail.
safe_assert(_:_) :- !, fail.