Bug fix - array index was checked against size of wrong array.
Bug fix - array index was checked against size of wrong array.

alephobjects/CuraEngine,ROBO3D/CuraEngine,Ultimaker/CuraEngine,alephobjects/CuraEngine,ROBO3D/CuraEngine,alephobjects/CuraEngine,ROBO3D/CuraEngine,Ultimaker/CuraEngine