Modified handling of FeatureLayers to conform to API changes