Fix #759 - channels cannot be reattached

This was a regression caused by aed1d61 :(
Merge pull request #760 from jpnurmi/attach

Fix #759 - channels cannot be reattached