Fix warning for possible uninitialized array access.

The gcc 4.8.3 compiler warned of possible uninitialized array access,
hopefully this rearrangement of the code will allow the compiler to
see that all used array elements are properly initialized.

Change-Id: Ia34df5d92b548c25a874015502f338a05a7d76e9
Merge topic 'bspline-array-warning' into master

f29e5649 Fix warning for possible uninitialized array access.