[bugfix] choose correct type for range index lookup

Fixes one of the two issues reported in #248.