doing it in the engine would be interesting, although doing it in a way that raises errors where you want them to be raised (ie, as the dep is introduced) would probably be expensive. on the other hand, we're already doing cycle detection there, and it's only 3% of runtime, so... could probably generalize it.