Marker optimization: fix support of partial trajectories