[bugfix] new range index: convert type of lookup key to index type where necessary
[bugfix] new range index: wrong type returned for field