WIP: https://github.com/JuliaLang/julia/issues/1032

Mostly works on the following index types: (Int, Range1{Int}, Range{Int})
Does not yet work for index of Array{Int}