The layer pointer lp = (GET_LAYER(map, j)); /*first layer*/ is used in msOWSLookupMetadata( ... , "offering_description") before being set.