The code that handles ws for distributed caches is in the VersionedEntryWrappingInterceptor(VEWI).
I don't think that that code you pointed belongs to the OptimisticLockingInterceptor (OLI) for two reasons: the OLI is should handle the locking and write skew checking is an orthogonal concern. Also the rest of write skew checking is handled in the VEWI, so this logic should be placed there as well.
TBH I think write skew check logic deserve its own dedicated interceptor as the code in this area is spread over too many places: OLI, VEWI and some not nice static methods in the ClusteringDependentLogic. At least for me it is quite hard to follow it as it is now. Wdyt?
Cheers,
Mircea