diff --git a/racket/collects/syntax/moddep.rkt b/racket/collects/syntax/moddep.rkt index dc8c53c8b7..0bf9e69973 100644 --- a/racket/collects/syntax/moddep.rkt +++ b/racket/collects/syntax/moddep.rkt @@ -22,9 +22,9 @@ (let ([accum (let loop ([accum (cons (list indent path fs phase) accum)]) (cond [(null? accum) null] - [(hash-ref seen accum #f) null] + [(and seen (hash-ref seen accum #f)) null] [else - (hash-set! seen accum #t) + (when seen (hash-set! seen accum #t)) (cons (car accum) (loop (cdr accum)))]))]) (for ([i (in-list (reverse accum))]) (apply show i))))