mrb: implement resolving index on match operation