Fix potential race in dispatcher wakeup

Created by  Eelco Dolstra  on August 10, 2015
RKW3XA4UGUXX6L4JPA2ZLDFEF2RS6MZYR6C2GK23SYTRWMUADV3QC
Change contents