I see you're relying on the behavior you introduced in usb_cdcacm.c -- the meaning of usb_cdcacm_get_pending() is the number of unsent bytes, not whether or not there are any unsent bytes.