I think the problem is that the spatial index isn't being informed of the object removal. Again, removing objects from the spatial index is potentially expensive, which is why it no longer automatically happens when the user removes or otherwise changes an object's position -- when the spatial index is rebuilt is a design decision left to the implementor as they'd presumably know best when to do that.
In other words, I think I resolved your problem by adding the following to your Sim.start():
schedule.scheduleRepeating(new Steppable()
{
public void step(SimState state)
{
trailSpace.updateSpatialIndex();
}
});
However it might be more efficient to trigger such an event only when something is actually removed or otherwise has its position changed.