resolved fdo#79441 keep 3D references intact during sort

Change-Id: I9e96d8e7cb99a3c280dd24495eefb9efd6d10888