The wake-up queue is now emptied before the check instead of afterwards... this.setAwake now empties the queue (and sendPending does it again, but finds nothign). This used to happen after the re-initialization check.

So either this.setAwake must NOT empty the queue or this.setAwake needs to be moved after the re-initialization check.

I find this.setAwake a bit dangerous to empty the queue, because it's called from multiple places. But I can have a look at it this weekend, if you want me to. I understand and appreciate the idea of the modification, It's just that the wake-up process is really fragile ;-)