See 6b98b274b6 for an explanation of the problem and solution. Here I've applied the solution to channels.
6b98b274b6