Emit calls to runtime.chancap

Fixes #69