handling sameas in linkset query