Fixing array bounds issue

When alpha is zero, the array is indexed past the end.
This junk data is then multiplied by zero so it had
the correct behavior on most platforms, but for some
(e.g. Visual Studio) there is runtime bounds checking
and the program would error. So check for this case
to avoid going past the end of the array

Change-Id: I0d1c8bf94a65983fd8303ffbb7e1c75ca778f614
Merge topic 'divided-edge-bundle-fix' into master

a1958d2b Fixing array bounds issue