You'd really have to add a recursion counter, yes. I wouldn't have to be in ad_conn as it's not really useful in a general sense, you could declare it as a global and just share it between rp_handler (to init recursion depth to zero) and test and increment it in your internal redirector.
In practice though I'm comfortable with your just documentating that infinite recursion is not detected other than by server crash.