Automap rule keeps placing objects in object output layers, even though the objects are already there

Not sure if this is intended behavior, but I have an automap rule for a cave entrance tile (among others). Once I place a cave entrance tile, the rule automatically places collision objects, but also a teleportTo object and teleportFrom object. I use this information in LibGDX to determine where Player teleports to and from when he touches the object. The issue with this is that it keeps placing the objects, even though the objects are already there. This results in there being many teleport objects and many collision objects etc. in the exact same spot. It does this whenever I press the automap hotkey or even if I just change the tile next to the cave entrance.

If this was intended behavior, is there a way to avoid this? Skipping all teleport and collision automapping until I want to export the map for production/testing is a tedious job, considering automapping is there to make my life easier.

How it should work in my opinion:
Once the cave entrance tile (or any other tile with object output layers in the rulefile) is placed, it checks if the objects it wants to place are identical to the objects that are already there. If they are, it won’t automap again. If one or more of the objects are missing, it will simply place only the objects that are missing.

Right, that behavior is not useful. Indeed it would be helpful to avoid placing the same object again, though I’m afraid that such a check will not be cheap because it will need to compare the potential new object to all existing objects to see if it is different. It will also not help in case you move the entrance.

Did you try adding a boolean DeleteTiles rule map property and setting it to true? The name is a little confusing because automapping used to only apply to tile layers, but in case the output layer is an object layer this property should cause the deletion of objects within the regions where rules are applied. When using this property you’ll likely want to make sure to use a separate object layer for manually placed objects, to make sure they aren’t deleted. And of course, since this property is a rule map property, it will also apply to any other output layers, so you may need to move some rules to another rule map if that’s not desired.