There is some people intentionally placing teleports that leads to itself or to another teleport to make an infinite loop causing stackoverflow.
This will print warnings on map loading if there is teleports like that.
detectteleport.patch · GitHub
This will print warnings on map loading if there is teleports like that.
detectteleport.patch · GitHub