Add restricted channel select feature

Currently, the case where both ends of a channel are inside a select
statement is unsupported.