I've implemented runtime recursion detection to address this: https://redmine.freeciv.org/issues/554
It's not the best possible solution, but it's a lot simpler than fancy rssanity stuff; and even if we add sanity checks later, it still prevents crashes if something slips through the cracks (or through the intentional holes we leave to avoid being overly restrictive).
Let's try to collect tickets about infinite recursion with requirements here. Makes easier to update/check all of them if there's any change.
MinCulture: https://www.hostedredmine.com/issues/868577
Self-provided Goods: #43724
Building obsolete-by itself: #45963