     ] if ;
 
 : process-loop-ends ( loop -- )
-    [ ends>> keys <dlist> [ push-all-front ] [ work-list set ] [ ] tri ] keep
+    [ ends>> members <dlist> [ push-all-front ] [ work-list set ] [ ] tri ] keep
     '[ _ process-loop-block ] slurp-deque ;
 
 : process-loop-headers ( -- )

SYMBOLS: visited active ;

: record-back-edge ( from to -- )
    lookup-header ends>> conjoin ;

DEFER: find-loop-headers

: visit-edge ( from to -- )
    dup active get in?
    [ record-back-edge ]
    [ nip find-loop-headers ]
    if ;

<PRIVATE

: <natural-loop> ( header index -- loop )
    HS{ } clone H{ } clone natural-loop boa ;

: lookup-header ( header -- loop )
    loops get [
