Fixing the way a whole set of waypoints is added.

This makes sure we don't lose the object pointer.