We could just do
base::ScopedState<> goal2D(si);
goal2D[0] = q.goalX_;
goal2D[0] = q.goalY_;
no?