In LocalStateTracingInstrumenter.InstrumentBlock, we report the state of parameters using LogParameterStore.
In that scenario, the parameter is always reported by its ordinal.
We also record parameters with LogParameterStore when it is assigned directly or via method return. But those other scenarios report using a BoundParameterId, which means that we'll either emit the parameter's ordinal or, in the case when the parameter is hoisted, the field's ordinal.
See logic in EmitParameterIdExpression.
This seems inconsistent for consumers of the logged information. We should probably also use a BoundParameterId in the call to LogParameterStore in LocalStateTracingInstrumenter.InstrumentBlock.
Relates to #79557 (comment)