In tight corners for raised rail, e.g. in intersections, the overlap detection doesn't seem to work correctly, i.e. ghosts are placed where they can't be build.
Also, under certain circumstances, e.g. when you invoke the planner twice on the same section. I think also happens if you mark signals for destruction, invoke the planer before they are removed and signals are placed on the same location again.
Below are blueprints for a problematic raised rail section and a blueprint with a normal intersection where the undo fails for two planner invocations after another:
0eNqll9tuozAURX8l8jNI+AYhn9HXqopM8KRWiUFcoqkq/n0MmZSkPRiwnxBgL2875+xNvlBWdLKqlW6PWVl+oMPX9KRBh9eH2+GdOpX69rhRZy2K4ZkWF4kOqBaqQH2AlM7lX3TAfTAzKGy6qirr9mEw6d8CJHWrWiVv+PHm86i7SyZrQwvuBFnIq2hlHjatgZ3f23BcOEBV2ZjppR5WM8iQpwH6NFcS437Q8oNIAlCTjUMgDnVQxq3KmMdeeQoRuYdGmBj7aEwgYuJD5BBx/5t46uqruYy/uLDuOjbFmatanm6vcQQskPpIppBkHK2uyngCPSuFsD7tw8EixeQ38l0Uf8JciXNpmn6Wm0zcJ+EEWoV6CGdg5WKf9mJg6WK+2UvYHgTFDiX7jYxXnKdPlzGwy/DeBwl3gU9jMdjtIw8kBQuJ+DQVBQuJbA8lGvdDdqpWXsysKasDVIhMmuhFL0I1Mt/9V3SVdTNyeExSlqacJWnCEzpl8eh0zqG/OseXjopRawARB1Biz+/1IG6P7fUgak/rpd5n+A5iy70fO+jD9qReBGEraL9dEezp6XZFM+EQOUiCM8Gh0mcMlmyvB7bm8wU7lP6MYTvUPuzTD1G6mgTb80OWLh7bt6ZoU4SuV5jMmfSyHWNoZjj+V3vy+GJ3M+ddVQitZb3LunNjhgizl6s83s3dsmT/D3U6mNA=