Retrieve applayer by layerNames, but keep the type as layername: appLayer stays the same for each feature (per layerinstance), but layer can change.