The getName() method returns the name of the feature datasource instead of the name of the layer.
Usually the layer name is independent of the data source.
There may be a modeling problem with geoscript.
Because a layer is not an abstraction of a data source (Feature or Raster) but directly linked to a FeatureSource.