Maybe this should just delegate to ns.EmitInPayload() and ns.EmitInField() rather than duplicating the conditional check? These functions are small enough that they'll almost certain be in-lined by the compiler...