Fix #350: provide an API for dce and closure invocation