Oh, somehow the "take 2" patch to dev.h (which changed last_scanned_channel from u8 to int) was missing here. As I'm using last_scanned_channel == -1 as a marker, u8 is a nono. New patch follows ...