Prepare global vars when the plan is parsed