Forbid model local variables in planner_objective.

Otherwise the preprocessor crashes.

(cherry picked from commit c45f45f58ed144ede58211614101ba763fdbf785)