Recursive handler iteration via generators