Channel package compare will fail if checking two unrelated channels when ch1 or ch2 is NULL.

See also commit 7d404c631dc86fa57fe98594a249b4c8d54baa7b.