fixed stack overflow for reccuring parent lookup of same id