Minor improvement to _check_frames_and_channels()