This issue was introduced in f3423b8a77, which assumed that number of input channels matches the number of outputs. With flexible I/O this is not necessarily the case. This fixes #9106, along with the previous commit.
f3423b8a77
rm -r
705386842b