We need to use the td-based marshalling instead of doing this manually, else the setting gets lost on the way to codegen in most build configs.