I\'ve implemeted an DbCommandInterceptor adding a max recursion depth to the generated SQL:
public override ValueTask