When assigning an expression to a symbol, scan all previously assigned
symbols for that new symbol to occur in the expressions and replace
it with the new expression.
This has the effect of making symbols global in the scope of a ginsh
session.
See <https://www.ginac.de/pipermail/ginac-devel/2024-December/002655.html>.
The patch restores the behavior prior to GiNaC 1.4.4. It actually
even improves on it because the old version was based on assigned
symbols and that did not work with circular assignments whereas
substituion does.