carbon-returner: make it more flexible

Fixes #7821