addUIds function

Eliminates partial parentage situations by adding unique placeholder IDs for the unknown parent.