Fix array index out of bounds issue in Planner

Reviewable, simple fix, waiting for Jenkins Blue.