Fix double-free error that occurs when an exception is thrown from a handler that has been dispatched (i.e. not posted) through a strand.