MANT: rename variable to avoid shadowing

The variable `obj` in `prepare_index` is shadowed in an inner scope within
the function. Renamed the inner scope variable to `tmp_obj` to avoid
confusion.
Merge pull request #4500 from jaimefrio/mapping-shadowing

MANT: rename variable to avoid shadowing