Fix and enable synchronization wrapper.

The main commit here is e75973436be2d7dcc6cae837cd96c00bb3ff4b0b. Any suggestions on how to generate the first unwind check without modifying the backend generate function?