Fix array index out of bounds issue in Planner

Reviewable, simple fix, waiting for Jenkins Blue.
Zealous deleting of code, good catch.