Fix crash of OKS library saving relationships of UID and UID2 types. Fix method OksObject::trim_dangling()