Share common code for detecting index of accessor