Handle self lookup properly.