Calling transform generates a StackOverflowError exception

Calling transform generates the following exception:
java.lang.StackOverflowError: null
	at com.tinkerpop.gremlin.scala.GremlinScalaPipeline.transform(GremlinScalaPipeline.scala:343) ~[gremlin-scala-2.4.1.jar:na]
	at com.tinkerpop.gremlin.scala.GremlinScalaPipeline.transform(GremlinScalaPipeline.scala:343) ~[gremlin-scala-2.4.1.jar:na]
	at com.tinkerpop.gremlin.scala.GremlinScalaPipeline.transform(GremlinScalaPipeline.scala:343) ~[gremlin-scala-2.4.1.jar:na]
	at com.tinkerpop.gremlin.scala.GremlinScalaPipeline.transform(GremlinScalaPipeline.scala:343) ~[gremlin-scala-2.4.1.jar:na]
	at com.tinkerpop.gremlin.scala.GremlinScalaPipeline.transform(GremlinScalaPipeline.scala:343) ~[gremlin-scala-2.4.1.jar:na]
	at com.tinkerpop.gremlin.scala.GremlinScalaPipeline.transform(GremlinScalaPipeline.scala:343) ~[gremlin-scala-2.4.1.jar:na]

Shouldn't it be map instead of transform here?