Organize imports
OVT-7973: Prevent copying old relations

Checks that refered code is the latest version in relation before
creating a new relation.