#6627: Handling case when rel is between same structures