Array bounds overflow fix
Addresses review feedback, exterimates var
Merge pull request #177 from scala/fix-array-bounds-overflow

Array bounds overflow fix