[index] Fix signed/unsigned comparison in is_valid (MPL_ASSERT).