Implement OriginVn loop prevention

Change-Id: I579926bc485e87c29c4a5f1321a8627eb5dfea28