fix #6840, bad indexing result type for abstractly-typed index vector

the core problem was that we couldn't infer the type of convert(Int,x::Real),
because there are way too many matching methods. this argues for a
conversion operator that expands to `convert(T,x)::T`, or a way to declare
an overall type for `convert`.