channel: fix infinite recursion