Look through addrspacecasts when turning ptr comparisons into
index comparisons.