Implement OriginVn loop prevention

Change-Id: I8658636c3c41032cb3fb23880f1fa2556d9a7dad