If I understanding this correctly, the flow ends in `rsP = restServiceNgsi9MTenant` if multitenant=header (as header != off). However, in this case rsP should use the variant of the array without URL token for the tenant (as the tenant goes in the HTTP header).

Or maybe I'm confused... the loop is a bit hard to follow to me. I'd have used a two-levels if (first, checking if ngsi9only or not, then checking the multitenant value).