Scope of Map Instance Extended Reference.
The scope of the extended_entity_ref_id of the extended entity reference that optionally defines a map entity in the head of a MAP declaration, is the actual MAP declaration defining the extended entity reference. Inside the map body the extended_entity_ref_id represents the instanceId of the currently created Map Instance. Hence this instance can be referred to by the extended_entity_ref_id from any expression within the map where it is defined. It is legal to define another variable with the same name in an inner scope. This should be avoided as it can lead to erroneous mapping schemata, and mapping schemata that is difficult to read and understand.