Merge "Fix possible race conditions during channel unregistration." into gingerbread