[Bug 11339] serial.c:wait_on() sanity checks seem to be too strict